'use strict';

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

var vue = require('vue');
var iconsVue = require('@element-plus/icons-vue');
var index = require('../../overlay/index.js');
require('../../dialog/index.js');
var index$1 = require('../../icon/index.js');
require('../../../directives/index.js');
var index$2 = require('../../button/index.js');
require('../../../hooks/index.js');
var drawer = require('./drawer2.js');
var index$3 = require('../../../directives/trap-focus/index.js');
var index$4 = require('../../../hooks/use-locale/index.js');
var useDialog = require('../../dialog/src/use-dialog.js');

var script = vue.defineComponent({
  name: "ElDrawer",
  components: {
    ElOverlay: index.ElOverlay,
    ElIcon: index$1.ElIcon,
    ElButton: index$2.ElButton,
    Close: iconsVue.Close
  },
  directives: {
    TrapFocus: index$3["default"]
  },
  props: drawer.drawerProps,
  emits: drawer.drawerEmits,
  setup(props, ctx) {
    const drawerRef = vue.ref();
    const { t } = index$4.useLocale();
    const cancelText = props.cancelText || t("el.popconfirm.cancelButtonText");
    const submitText = props.submitText || t("el.popconfirm.confirmButtonText");
    const isHorizontal = vue.computed(() => props.direction === "rtl" || props.direction === "ltr");
    const drawerSize = vue.computed(() => typeof props.size === "number" ? `${props.size}px` : props.size);
    return {
      ...useDialog.useDialog(props, ctx, drawerRef),
      drawerRef,
      isHorizontal,
      drawerSize,
      cancelText,
      submitText
    };
  }
});

exports["default"] = script;
//# sourceMappingURL=drawer.vue_vue_type_script_lang.js.map
