'use strict';

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

var vue = require('vue');
var index = require('../../button/index.js');
var index$2 = require('../../icon/index.js');
var index$1 = require('../../popper/index.js');
require('../../../hooks/index.js');
var popconfirm = require('./popconfirm2.js');
var index$3 = require('../../../hooks/use-locale/index.js');
var defaults = require('../../popper/src/use-popper/defaults.js');

var script = vue.defineComponent({
  name: "ElPopconfirm",
  components: {
    ElButton: index.ElButton,
    ElPopper: index$1["default"],
    ElIcon: index$2.ElIcon
  },
  props: popconfirm.popconfirmProps,
  emits: popconfirm.popconfirmEmits,
  setup(props, { emit }) {
    const { t } = index$3.useLocale();
    const visible = vue.ref(false);
    const confirm = () => {
      visible.value = false;
      emit("confirm");
    };
    const cancel = () => {
      visible.value = false;
      emit("cancel");
    };
    const finalConfirmButtonText = vue.computed(() => props.confirmButtonText || t("el.popconfirm.confirmButtonText"));
    const finalCancelButtonText = vue.computed(() => props.cancelButtonText || t("el.popconfirm.cancelButtonText"));
    return {
      Effect: defaults.Effect,
      visible,
      finalConfirmButtonText,
      finalCancelButtonText,
      confirm,
      cancel
    };
  }
});

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