import f from "react";
import g from "../../../../../../../../_virtual/index5.js";
import { handleFocus as x } from "../../helpers/interaction.js";
import { Checkboard as E } from "./Checkboard.js";
var v = Object.assign || function(r) {
  for (var e = 1; e < arguments.length; e++) {
    var t = arguments[e];
    for (var o in t)
      Object.prototype.hasOwnProperty.call(t, o) && (r[o] = t[o]);
  }
  return r;
}, H = 13, O = function(e) {
  var t = e.color, o = e.style, a = e.onClick, i = a === void 0 ? function() {
  } : a, l = e.onHover, c = e.title, p = c === void 0 ? t : c, m = e.children, w = e.focus, d = e.focusStyle, y = d === void 0 ? {} : d, b = t === "transparent", s = g({
    default: {
      swatch: v({
        background: t,
        height: "100%",
        width: "100%",
        cursor: "pointer",
        position: "relative",
        outline: "none"
      }, o, w ? y : {})
    }
  }), C = function(n) {
    return i(t, n);
  }, S = function(n) {
    return n.keyCode === H && i(t, n);
  }, k = function(n) {
    return l(t, n);
  }, u = {};
  return l && (u.onMouseOver = k), f.createElement(
    "div",
    v({
      style: s.swatch,
      onClick: C,
      title: p,
      tabIndex: 0,
      onKeyDown: S
    }, u),
    m,
    b && f.createElement(E, {
      borderRadius: s.swatch.borderRadius,
      boxShadow: "inset 0 0 0 1px rgba(0,0,0,0.1)"
    })
  );
};
const j = x(O);
export {
  O as Swatch,
  j as default
};
//# sourceMappingURL=Swatch.js.map
