"use strict";
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
const Vue = require("vue");
const SvgIcon = require("./SvgIcon.vue.js");
const ArrowDown = require("../icons/ArrowDown.vue.js");
const _hoisted_1 = {
  key: 1,
  class: "container-header"
};
const _sfc_main = /* @__PURE__ */ Vue.defineComponent({
  __name: "ActionSheep",
  props: {
    visible: {
      type: Boolean,
      default: false
    },
    title: {
      type: String,
      default: ""
    },
    showClose: {
      type: Boolean,
      default: true
    },
    showMask: {
      type: Boolean,
      default: true
    },
    height: {
      type: String,
      default: ""
    }
  },
  emits: ["input"],
  setup(__props, { emit: __emit }) {
    const props = __props;
    const emit = __emit;
    const show = Vue.ref(false);
    Vue.watch(
      () => props.visible,
      (val) => show.value = val,
      { immediate: true }
    );
    Vue.watch(show, (val) => emit("input", val), { immediate: true });
    const toggleShow = () => show.value = !show.value;
    return (_ctx, _cache) => {
      return Vue.openBlock(), Vue.createElementBlock("div", null, [
        Vue.withDirectives(Vue.createElementVNode("div", {
          class: "mask",
          onClick: Vue.withModifiers(toggleShow, ["stop"])
        }, null, 512), [
          [Vue.vShow, show.value && __props.showMask]
        ]),
        Vue.withDirectives(Vue.createElementVNode("div", {
          class: "container",
          style: Vue.normalizeStyle({ height: props.height })
        }, [
          __props.showClose ? (Vue.openBlock(), Vue.createElementBlock("div", {
            key: 0,
            class: "container-close",
            onClick: toggleShow
          }, [
            Vue.createVNode(SvgIcon.default, { icon: ArrowDown.default })
          ])) : Vue.createCommentVNode("", true),
          __props.title ? (Vue.openBlock(), Vue.createElementBlock("div", _hoisted_1, Vue.toDisplayString(__props.title), 1)) : Vue.createCommentVNode("", true),
          Vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
        ], 4), [
          [Vue.vShow, show.value]
        ])
      ]);
    };
  }
});
exports.default = _sfc_main;
