'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

var vue = require('vue');
var index = require('../../icon/index.js');
require('../../../utils/index.js');
require('../../../tokens/index.js');
var dialogContent = require('./dialog-content2.js');
var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
var icon = require('../../../utils/vue/icon.js');
var dialog = require('../../../tokens/dialog.js');

const _hoisted_1 = ["aria-label", "widget"];
const _hoisted_2 = ["widget"];
const _hoisted_3 = ["widget"];
const _hoisted_4 = ["widget"];
const __default__ = { name: "PsDialogContent" };
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
  ...__default__,
  props: dialogContent.dialogContentProps,
  setup(__props) {
    const { Close } = icon.CloseComponents;
    const { dialogRef, headerRef, ns, style } = vue.inject(dialog.dialogInjectionKey);
    return (_ctx, _cache) => {
      return vue.openBlock(), vue.createElementBlock("div", {
        ref_key: "dialogRef",
        ref: dialogRef,
        class: vue.normalizeClass([
          vue.unref(ns).b(),
          vue.unref(ns).is("fullscreen", _ctx.fullscreen),
          vue.unref(ns).is("draggable", _ctx.draggable),
          { [vue.unref(ns).m("center")]: _ctx.center },
          _ctx.customClass
        ]),
        "aria-modal": "true",
        role: "dialog",
        "aria-label": _ctx.title || "dialog",
        style: vue.normalizeStyle(vue.unref(style)),
        widget: _ctx.widget
      }, [
        vue.createElementVNode("div", {
          ref_key: "headerRef",
          ref: headerRef,
          class: vue.normalizeClass(vue.unref(ns).e("header")),
          widget: _ctx.widget ? "dialog:title:" + _ctx.widget.split(":")[1] : void 0
        }, [
          vue.renderSlot(_ctx.$slots, "title", {}, () => [
            vue.createElementVNode("span", {
              class: vue.normalizeClass(vue.unref(ns).e("title"))
            }, vue.toDisplayString(_ctx.title), 3)
          ])
        ], 10, _hoisted_2),
        vue.createElementVNode("div", {
          class: vue.normalizeClass(vue.unref(ns).e("body")),
          widget: _ctx.widget ? "dialog:default:" + _ctx.widget.split(":")[1] : void 0
        }, [
          vue.renderSlot(_ctx.$slots, "default")
        ], 10, _hoisted_3),
        _ctx.$slots.footer ? (vue.openBlock(), vue.createElementBlock("div", {
          key: 0,
          class: vue.normalizeClass(vue.unref(ns).e("footer")),
          widget: _ctx.widget ? "dialog:footer:" + _ctx.widget.split(":")[1] : void 0
        }, [
          vue.renderSlot(_ctx.$slots, "footer")
        ], 10, _hoisted_4)) : vue.createCommentVNode("v-if", true),
        _ctx.showClose ? (vue.openBlock(), vue.createElementBlock("button", {
          key: 1,
          "aria-label": "close",
          class: vue.normalizeClass(vue.unref(ns).e("headerbtn")),
          type: "button"
        }, [
          vue.createVNode(vue.unref(index.PsIcon), {
            class: vue.normalizeClass(vue.unref(ns).e("close"))
          }, {
            default: vue.withCtx(() => [
              (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.closeIcon || vue.unref(Close))))
            ]),
            _: 1
          }, 8, ["class"])
        ], 2)) : vue.createCommentVNode("v-if", true)
      ], 14, _hoisted_1);
    };
  }
});
var PsDialogContent = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "/Users/meng/workspace/element-ps/packages/components/dialog/src/dialog-content.vue"]]);

exports["default"] = PsDialogContent;
//# sourceMappingURL=dialog-content.js.map
