import { createVNode as _createVNode } from "vue";
//@ts-nocheck
import { defineComponent } from "vue";
import { getSlot } from '../_util/props-util';
import Dropdown from '../dropdown';
export default defineComponent({
  name: 'SelectTrigger',
  props: {
    prefixCls: String,
    containerWidth: Number,
    popup: Object,
    visible: Boolean,
    disabled: Boolean,
    onVisibleChange: Function
  },

  setup(props, {
    attrs,
    slots,
    emit
  }) {
    const {
      prefixCls
    } = props;
    return self => {
      const dropdownPrefixCls = `${prefixCls}-dropdown`;
      const popupStyle = {
        width: `${props.containerWidth}px`
      };
      return _createVNode(Dropdown, {
        "popup": props.popup,
        "trigger": "",
        "placement": 'bottom',
        "popupClass": dropdownPrefixCls,
        "popupStyle": popupStyle,
        "visible": props.visible,
        "onVisibleChange": props.onVisibleChange
      }, {
        default: () => [getSlot(self)[0]]
      });
    };
  }

});