"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;
