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

'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

var VueCompositionAPI = require('@vue/composition-api');
var hooks_lnode = require('../../hooks/lnode.js');
var components_configProvider_useConfig = require('../config-provider/useConfig.js');
var hooks_useCommonClassname = require('../../hooks/use-common-classname.js');
var components_select_props = require('./props.js');
require('lodash/isEmpty');
require('lodash/isFunction');
require('lodash/camelCase');
require('lodash/kebabCase');
require('../../hooks/render-lnode.js');
require('lodash');
require('../config-provider/context.js');
require('../../chunks/zh_CN.js');

var _OptionGroup = VueCompositionAPI.defineComponent({
  name: "LOptionGroup",
  props: {
    ...components_select_props.SelectOptionGroupProps
  },
  setup(props2) {
    const {
      divider
    } = VueCompositionAPI.toRefs(props2);
    const tSelect = VueCompositionAPI.inject("tSelect");
    const {
      sizeClassNames
    } = hooks_useCommonClassname["default"]();
    const COMPONENT_NAME = components_configProvider_useConfig.usePrefixClass("select");
    const {
      classPrefix
    } = components_configProvider_useConfig.useConfig("classPrefix");
    const classes = VueCompositionAPI.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 = hooks_lnode.useLNodeJSX();
    const children = renderTNode("default");
    return h("li", {
      "class": this.classes
    }, [h("div", {
      "class": `${this.componentName}-option-group__header`
    }, [this.label]), children]);
  }
});

exports["default"] = _OptionGroup;
//# sourceMappingURL=option-group.js.map
