"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;
var _vue = require("vue");
var _Mark = _interopRequireDefault(require("./Mark"));
const marksProps = () => ({
  prefixCls: String,
  marks: Array,
  onClick: Function
});
const Marks = (0, _vue.defineComponent)({
  name: 'AMarks',
  props: marksProps(),
  setup(props) {
    return () => {
      const {
        prefixCls,
        marks,
        onClick
      } = props;
      const markPrefixCls = `${prefixCls}-mark`;
      if (!marks.length) {
        return null;
      }
      return (0, _vue.createVNode)("div", {
        "class": markPrefixCls
      }, [marks.map(({
        value,
        style,
        label
      }) => (0, _vue.createVNode)(_Mark.default, {
        "key": value,
        "prefixCls": markPrefixCls,
        "style": style,
        "value": value,
        "onClick": onClick
      }, {
        default: () => [label]
      }))]);
    };
  }
});
var _default = exports.default = Marks;