/**
 * ldesign v0.2.3
 * (c) 2022年9月24日 swimly
 * @license MIT
 */

import { h as helper } from '../../chunks/helper.js';
import { defineComponent, toRefs } from '@vue/composition-api';
import props from './props.js';
import ColorPanel from './panel/index.js';
import { usePrefixClass } from '../config-provider/useConfig.js';
import useVModel from '../../hooks/use-vmodel.js';
import '../../chunks/_commonjsHelpers.js';
import '../../hooks/use-config.js';
import '../../hooks/use-common-classname.js';
import './const.js';
import './panel/header.js';
import '../radio/index.js';
import '../radio/radio.js';
import 'vue';
import '../../utils/helper.js';
import 'lodash/camelCase';
import '../../utils/render-node.js';
import 'lodash/kebabCase';
import '../radio/props.js';
import '../../utils/event.js';
import '../config-provider/config-receiver.js';
import 'lodash/mergeWith';
import 'lodash';
import '../config-provider/context.js';
import '../../chunks/zh_CN.js';
import '../config-provider/type.js';
import '../../utils/mixins.js';
import '../radio/group.js';
import 'lodash/isString';
import 'lodash/isNumber';
import '../radio/radio-button.js';
import '../../utils/map-props.js';
import '../../utils/with-install.js';
import '../../config.js';
import '../radio/style/css.js';
import '../radio/type.js';
import './hooks/index.js';
import './panel/linear-gradient.js';
import 'lodash/cloneDeep';
import './utils/index.js';
import '../../chunks/defineProperty-56324511.js';
import '../input-number/index.js';
import '../input-number/input-number.js';
import '@ldesign/icons-vue';
import '../button/index.js';
import '../button/button.js';
import '../loading/index.js';
import '../loading/loading.js';
import '../loading/icon/gradient.js';
import '../../chunks/set-style.js';
import '../../chunks/helper2.js';
import '../../utils/dom.js';
import 'raf';
import '../../utils/easing.js';
import '../../utils/transfer-dom.js';
import '../loading/props.js';
import '../loading/style/css.js';
import '../loading/type.js';
import '../loading/plugin.js';
import '../button/props.js';
import '../../utils/ripple.js';
import '../button/style/css.js';
import '../button/type.js';
import '../input/index.js';
import '../input/input.js';
import '../input/props.js';
import '../input/group.js';
import '../input/style/css.js';
import '../input/type.js';
import '../input-number/props.js';
import '../input-number/hooks/use-input-number.js';
import '../../chunks/isObjectLike-a2de5c2f.js';
import '../../chunks/_commonjsHelpers-8b4be15a.js';
import '../../chunks/isArray-9ce6380b.js';
import '../../chunks/log.js';
import '../../hooks/use-form-disabled.js';
import '../../hooks/use-global-icon.js';
import '../input-number/style/css.js';
import '../input-number/type.js';
import './panel/base-props.js';
import './panel/saturation.js';
import '../select/index.js';
import '../select/select.js';
import 'lodash/isFunction';
import 'lodash/debounce';
import 'lodash/get';
import 'lodash/isArray';
import '../../hooks/use-default-value.js';
import '../../hooks/lnode.js';
import 'lodash/isEmpty';
import '../../hooks/render-lnode.js';
import 'lodash/isObject';
import '../select/props.js';
import '../popup/index.js';
import '../popup/popup.js';
import '@popperjs/core';
import '../popup/props.js';
import '../popup/container.js';
import '../popup/style/css.js';
import '../popup/type.js';
import '../tag/index.js';
import '../tag/tag.js';
import '../tag/props.js';
import '../tag/check-tag.js';
import '../tag/style/css.js';
import '../tag/type.js';
import '../select-input/index.js';
import '../select-input/select-input.js';
import '../select-input/props.js';
import '../select-input/hooks/use-single.js';
import 'lodash/pick';
import '../select-input/hooks/use-multiple.js';
import '../select-input/hooks/use-overlay-innerstyle.js';
import '../select-input/style/css.js';
import '../select-input/type.js';
import '../common/fake-arrow.js';
import '../select/option.js';
import '../checkbox/index.js';
import '../checkbox/group.js';
import 'lodash/intersection';
import '../checkbox/checkbox.js';
import '../checkbox/props.js';
import '../checkbox/style/css.js';
import '../checkbox/type.js';
import '../../hooks/use-lazy-load.js';
import '../../chunks/observe.js';
import '../select/utils.js';
import '../select/select-panel.js';
import '../../hooks/use-virtual-scroll.js';
import '../select/hooks/use-select-options.js';
import '../select/option-group.js';
import '../select/style/css.js';
import '../select/type.js';
import './panel/hue.js';
import './panel/slider.js';
import './panel/alpha.js';
import './panel/format/index.js';
import 'lodash/upperCase';
import './panel/format/inputs.js';
import 'lodash/throttle';
import './panel/format/config.js';
import './panel/swatches.js';

var _ColorPickerPanel = defineComponent({
  name: "LColorPickerPanel",
  components: {
    ColorPanel
  },
  inheritAttrs: false,
  props: { ...props
  },

  setup(props2) {
    const prefix = usePrefixClass();
    const {
      value
    } = toRefs(props2);
    const [innerValue, setInnerValue] = useVModel(value, props2.defaultValue, props2.onChange, "change");

    const handleChange = (value2, context) => {
      setInnerValue(value2, context);
    };

    return {
      prefix,
      innerValue,
      setInnerValue,
      handleChange
    };
  },

  render() {
    const h = arguments[0];
    const {
      prefix,
      innerValue,
      handleChange
    } = this;
    return h("color-panel", helper([{
      "props": { ...{ ...this.$props,
          closeBtn: false,
          popupProps: null,
          value: innerValue
        }
      }
    }, {
      "on": {
        change: handleChange
      }
    }, {
      "class": `${prefix}-is-inline`
    }]));
  }

});

export { _ColorPickerPanel as default };
//# sourceMappingURL=color-picker-panel.js.map
