<script setup>
import { computed, onMounted, ref } from "vue";
import { Icon } from '@iconify/vue';
import { t } from '@/shared/i18n';

const props = defineProps(["df"]);
</script>

<template>
  <div class="control editable">
    <div class="field-controls">
      <slot name="label" />
      <slot name="actions" />
    </div>
    <div class="map-placeholder">
      <Icon icon="mdi:map-marker" class="icon-lg" />
      <span>{{ t("Geolocation Field") }}</span>
    </div>
    <div v-if="df.description" class="mt-2 description" v-html="df.description"></div>
  </div>
</template>

<style lang="scss" scoped>
.map-placeholder {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 200px;
  background-color: #f9fafb;
  border: 1px dashed #d1d5db;
  border-radius: 6px;
  color: #9ca3af;
  gap: 8px;
  
  span {
    font-size: 13px;
  }
}

.icon-lg {
  width: 32px;
  height: 32px;
}

.description {
  font-size: 12px;
  color: #6b7280;
}

.mt-2 {
  margin-top: 0.5rem;
}
</style>
