<script setup>
import { Icon } from '@iconify/vue';

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

<template>
  <div class="control editable">
    <div class="field-controls">
      <slot name="label" />
      <slot name="actions" />
    </div>
    <div class="missing-image">
      <Icon icon="mdi:image-off-outline" class="icon-lg" />
    </div>
    <div v-if="df.description" class="mt-2 description" v-html="df.description"></div>
  </div>
</template>

<style lang="scss" scoped>
.missing-image {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 150px;
  background-color: #f9fafb;
  border: 1px dashed #d1d5db;
  border-radius: 6px;
  color: #9ca3af;
}

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

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

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