{"version":3,"file":"dialog-content2.mjs","sources":["../../../../../../packages/components/dialog/src/dialog-content.vue"],"sourcesContent":["<template>\n  <div :ref=\"composedDialogRef\" :class=\"dialogKls\" :style=\"style\" tabindex=\"-1\">\n    <header ref=\"headerRef\" :class=\"ns.e('header')\">\n      <slot name=\"header\">\n        <span role=\"heading\" :aria-level=\"ariaLevel\" :class=\"ns.e('title')\">\n          {{ title }}\n        </span>\n      </slot>\n      <button\n        v-if=\"showClose\"\n        :aria-label=\"t('el.dialog.close')\"\n        :class=\"ns.e('headerbtn')\"\n        type=\"button\"\n        @click=\"$emit('close')\"\n      >\n        <el-icon :class=\"ns.e('close')\">\n          <component :is=\"closeIcon || Close\" />\n        </el-icon>\n      </button>\n    </header>\n    <div :id=\"bodyId\" :class=\"ns.e('body')\">\n      <slot />\n    </div>\n    <footer v-if=\"$slots.footer\" :class=\"ns.e('footer')\">\n      <slot name=\"footer\" />\n    </footer>\n  </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, inject } from 'vue'\nimport { ElIcon } from '@element-plus/components/icon'\nimport { FOCUS_TRAP_INJECTION_KEY } from '@element-plus/components/focus-trap'\nimport { useDraggable, useLocale } from '@element-plus/hooks'\nimport { CloseComponents, composeRefs } from '@element-plus/utils'\nimport { dialogInjectionKey } from './constants'\nimport { dialogContentEmits, dialogContentProps } from './dialog-content'\n\nconst { t } = useLocale()\nconst { Close } = CloseComponents\n\ndefineOptions({ name: 'ElDialogContent' })\nconst props = defineProps(dialogContentProps)\ndefineEmits(dialogContentEmits)\n\nconst { dialogRef, headerRef, bodyId, ns, style } = inject(dialogInjectionKey)!\nconst { focusTrapRef } = inject(FOCUS_TRAP_INJECTION_KEY)!\n\nconst dialogKls = computed(() => [\n  ns.b(),\n  ns.is('fullscreen', props.fullscreen),\n  ns.is('draggable', props.draggable),\n  ns.is('align-center', props.alignCenter),\n  { [ns.m('center')]: props.center },\n  props.customClass,\n])\n\nconst composedDialogRef = composeRefs(focusTrapRef, dialogRef)\n\nconst draggable = computed(() => props.draggable)\nuseDraggable(dialogRef, headerRef, draggable)\n</script>\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;mCAyCc,CAAA,EAAE,IAAM,EAAA,iBAAA,EAAkB,CAAA,CAAA;;;;;;;AAHxC,IAAM,MAAA,EAAE,MAAM,SAAU,EAAA,CAAA;AACxB,IAAA,MAAM,EAAE,KAAU,EAAA,GAAA,eAAA,CAAA;AAMlB,IAAA,MAAM,EAAE,SAAW,EAAA,SAAA,EAAW,QAAQ,EAAI,EAAA,KAAA,EAAA,GAAU,OAAO,kBAAkB,CAAA,CAAA;AAC7E,IAAM,MAAA,EAAE,YAAiB,EAAA,GAAA,MAAA,CAAO,wBAAwB,CAAA,CAAA;AAExD,IAAM,MAAA,SAAA,GAAY,SAAS,MAAM;AAAA,MAC/B,GAAG,CAAE,EAAA;AAAA,MACL,EAAG,CAAA,EAAA,CAAG,YAAc,EAAA,KAAA,CAAM,UAAU,CAAA;AAAA,MACpC,EAAG,CAAA,EAAA,CAAG,WAAa,EAAA,KAAA,CAAM,SAAS,CAAA;AAAA,MAClC,EAAG,CAAA,EAAA,CAAG,cAAgB,EAAA,KAAA,CAAM,WAAW,CAAA;AAAA,MACvC,EAAE,CAAC,EAAA,CAAG,EAAE,QAAQ,CAAA,GAAI,MAAM,MAAO,EAAA;AAAA,MACjC,KAAM,CAAA,WAAA;AAAA,KACP,CAAA,CAAA;AAED,IAAM,MAAA,iBAAA,GAAoB,WAAY,CAAA,YAAA,EAAc,SAAS,CAAA,CAAA;AAE7D,IAAA,MAAM,SAAY,GAAA,QAAA,CAAS,MAAM,KAAA,CAAM,SAAS,CAAA,CAAA;AAChD,IAAa,YAAA,CAAA,SAAA,EAAW,WAAW,SAAS,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}