"use strict";
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
const index = require("../../select/index.js");
const vue = require("vue");
const component = vue.defineComponent({
  extends: index.ElOption,
  setup(props, ctx) {
    const result = index.ElOption.setup(props, ctx);
    delete result.selectOptionClick;
    const vm = vue.getCurrentInstance().proxy;
    vue.nextTick(() => {
      if (!result.select.states.cachedOptions.get(vm.value)) result.select.onOptionCreate(vm);
    });
    vue.watch(() => ctx.attrs.visible, (val) => {
      vue.nextTick(() => {
        result.states.visible = val;
      });
    }, { immediate: true });
    return result;
  },
  methods: { selectOptionClick() {
    this.$el.parentElement.click();
  } }
});
exports.default = component;
