"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = exports.colorBlockProps = void 0;
var _vue = require("vue");
var _classNames = _interopRequireDefault(require("../../_util/classNames"));
require("../../_util/EventInterface");
const colorBlockProps = () => ({
  color: String,
  prefixCls: String,
  className: String,
  style: {
    type: Object
  },
  onClick: Function
});
exports.colorBlockProps = colorBlockProps;
const ColorBlock = (0, _vue.defineComponent)({
  name: 'ColorBlock',
  inheritAttrs: false,
  props: colorBlockProps(),
  setup(props) {
    const colorBlockCls = (0, _vue.computed)(() => `${props.prefixCls}-color-block`);
    return () => {
      const {
        style,
        onClick,
        color,
        className
      } = props;
      return (0, _vue.createVNode)("div", {
        "class": (0, _classNames.default)(colorBlockCls.value, className),
        "style": style,
        "onClick": onClick
      }, [(0, _vue.createVNode)("div", {
        "class": `${colorBlockCls.value}-inner`,
        "style": {
          background: color
        }
      }, null)]);
    };
  }
});
var _default = exports.default = ColorBlock;