/**
 * ldesign v0.2.14
 * (c) 2022/11/2 16:16 built by swimly
 * @license MIT
 */

import { defineComponent, toRefs, inject, computed } from '@vue/composition-api';
import { useLNodeJSX } from '../../hooks/lnode.js';
import { usePrefixClass, useConfig } from '../config-provider/useConfig.js';
import useCommonClassName from '../../hooks/use-common-classname.js';
import { SelectOptionGroupProps } from './props.js';
import 'lodash/isEmpty';
import 'lodash/isFunction';
import 'lodash/camelCase';
import 'lodash/kebabCase';
import '../../hooks/render-lnode.js';
import 'lodash';
import '../config-provider/context.js';
import '../../_chunks/dep-def4c2ce.js';

var _OptionGroup = defineComponent({
  name: "LOptionGroup",
  props: {
    ...SelectOptionGroupProps
  },
  setup(props2) {
    const {
      divider
    } = toRefs(props2);
    const tSelect = inject("tSelect");
    const {
      sizeClassNames
    } = useCommonClassName();
    const COMPONENT_NAME = usePrefixClass("select");
    const {
      classPrefix
    } = useConfig("classPrefix");
    const classes = computed(() => [`${COMPONENT_NAME.value}-option-group`, {
      [sizeClassNames[tSelect.size]]: tSelect && tSelect.size,
      [`${COMPONENT_NAME.value}-option-group__divider`]: divider
    }]);
    return {
      classes,
      classPrefix,
      componentName: COMPONENT_NAME
    };
  },
  render() {
    const h = arguments[0];
    const renderTNode = useLNodeJSX();
    const children = renderTNode("default");
    return h("li", {
      "class": this.classes
    }, [h("div", {
      "class": `${this.componentName}-option-group__header`
    }, [this.label]), children]);
  }
});

export { _OptionGroup as default };
//# sourceMappingURL=option-group.js.map
