import { computed, defineComponent, createVNode as _createVNode } from 'vue';
import classNames from '../../_util/classNames';
import '../../_util/EventInterface';
export const colorBlockProps = () => ({
  color: String,
  prefixCls: String,
  className: String,
  style: {
    type: Object
  },
  onClick: Function
});
const ColorBlock = defineComponent({
  name: 'ColorBlock',
  inheritAttrs: false,
  props: colorBlockProps(),
  setup(props) {
    const colorBlockCls = computed(() => `${props.prefixCls}-color-block`);
    return () => {
      const {
        style,
        onClick,
        color,
        className
      } = props;
      return _createVNode("div", {
        "class": classNames(colorBlockCls.value, className),
        "style": style,
        "onClick": onClick
      }, [_createVNode("div", {
        "class": `${colorBlockCls.value}-inner`,
        "style": {
          background: color
        }
      }, null)]);
    };
  }
});
export default ColorBlock;