<script setup>
import { ref, watch } from 'vue'

const props = defineProps({
  contenSec: Object, // <-- accept from parent
})
const emit = defineEmits(['update:contenSec'])

// Local copy
const localContent = ref({ ...props.contenSec })

// Sync changes back to parent
watch(localContent, (val) => {
  emit('update:contenSec', val)
}, { deep: true })
</script>

<template>
  <VCard title="Iframe" class="mb-1" v-if="localContent.iframe">
    <VCardText>
      <VTextarea
        v-model="localContent.iframe.iframeurl"
        label="Page URL"
        placeholder="Page URL"
        outlined
        rows="2"
        density="comfortable"
      />
    </VCardText>
  </VCard>
</template>
