import _extends from "@babel/runtime/helpers/esm/extends";
import React from "react";

/**
 * @component CheckboxIcon
 * @description
 *
 * The React Icon component is a visual element that displays an icon to represent a concept, object, or action.
 * The Icon component is
 * customizable, allowing for variations in size, color, and style to fit the needs of the application.
 *
 *
 * @example
 * return (
 *   <CheckboxIcon className="mr-2" showAdditionalIcon={true} />
 * )
 *
 * @see
 * https://system.activecollab.com/?path=/story/foundation-icons-icons--icons
 * @see
 * https://design.activecollab.com/docs/foundations/icons
 */
const CheckboxIcon = /*#__PURE__*/React.forwardRef((_ref, svgRef) => {
  let {
    mixed,
    "data-testid": testId,
    ...props
  } = _ref;
  // const [animate, setAnimate] = useState(false);
  // const mountRef = useRef(false);

  // useEffect(() => {
  //   if (mountRef.current) {
  //     setAnimate(true);
  //   } else {
  //     mountRef.current = true;
  //   }
  // }, [mixed]);

  if (mixed) {
    return /*#__PURE__*/React.createElement("svg", {
      width: "16",
      height: "16",
      viewBox: "0 0 16 16",
      fill: "none",
      xmlns: "http://www.w3.org/2000/svg",
      "data-testid": "checkbox-mixed-icon"
    }, /*#__PURE__*/React.createElement("path", {
      fillRule: "evenodd",
      clipRule: "evenodd",
      d: "M14.2222 0C15.2041 0 16 0.795938 16 1.77778V14.2222C16 15.2041 15.2041 16 14.2222 16H1.77778C0.795938 16 0 15.2041 0 14.2222V1.77778C0 0.795938 0.795938 0 1.77778 0H14.2222Z",
      fill: "var(--color-secondary)"
    }), /*#__PURE__*/React.createElement("rect", {
      x: "3",
      y: "7",
      width: 10,
      height: "2",
      rx: "1",
      fill: "var(--page-paper-main)"
    }));
  }
  return /*#__PURE__*/React.createElement("svg", _extends({
    width: 16,
    height: 16,
    viewBox: "0 0 16 16",
    xmlns: "http://www.w3.org/2000/svg",
    fill: "var(--color-theme-600)",
    focusable: false,
    ref: svgRef
  }, props, {
    "data-testid": testId
  }), /*#__PURE__*/React.createElement("g", {
    fillRule: "evenodd"
  }, /*#__PURE__*/React.createElement("rect", {
    stroke: "#8E8E8E",
    x: 0.5,
    y: 0.5,
    width: 15,
    height: 15,
    rx: 2
  }), /*#__PURE__*/React.createElement("path", {
    stroke: "#979797",
    strokeWidth: 2,
    d: "M12.243 5l-5.657 5.657-2.829-2.829"
  })));
});
CheckboxIcon.displayName = "CheckboxIcon";
export default CheckboxIcon;
//# sourceMappingURL=CheckboxIcon.js.map