import { defineComponent, ref, computed } from 'vue';
import { ElButton } from '../../button/index.mjs';
import { ElIcon } from '../../icon/index.mjs';
import _Popper from '../../popper/index.mjs';
import '../../../hooks/index.mjs';
import { popconfirmProps, popconfirmEmits } from './popconfirm2.mjs';
import { useLocale } from '../../../hooks/use-locale/index.mjs';
import { Effect } from '../../popper/src/use-popper/defaults.mjs';

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

export { script as default };
//# sourceMappingURL=popconfirm.vue_vue_type_script_lang.mjs.map
