"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    var desc = Object.getOwnPropertyDescriptor(m, k);
    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
      desc = { enumerable: true, get: function() { return m[k]; } };
    }
    Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
    Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
    o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
    var ownKeys = function(o) {
        ownKeys = Object.getOwnPropertyNames || function (o) {
            var ar = [];
            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
            return ar;
        };
        return ownKeys(o);
    };
    return function (mod) {
        if (mod && mod.__esModule) return mod;
        var result = {};
        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
        __setModuleDefault(result, mod);
        return result;
    };
})();
var __rest = (this && this.__rest) || function (s, e) {
    var t = {};
    for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
        t[p] = s[p];
    if (s != null && typeof Object.getOwnPropertySymbols === "function")
        for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
            if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
                t[p[i]] = s[p[i]];
        }
    return t;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.CheckboxInput = void 0;
const react_1 = __importStar(require("react"));
const helpers_1 = require("../../../utils/helpers");
const hooks_1 = require("../../../utils/hooks");
const CheckboxInput = (0, react_1.forwardRef)((_a, forwardedRef) => {
    var { className, indeterminate, standalone = true, compact } = _a, rest = __rest(_a, ["className", "indeterminate", "standalone", "compact"]);
    const indeterminateRef = (0, react_1.useCallback)((el) => {
        if (el) {
            el.indeterminate = indeterminate !== null && indeterminate !== void 0 ? indeterminate : false;
        }
    }, [indeterminate]);
    const mergedRef = (0, hooks_1.useMergeRefs)(indeterminateRef, forwardedRef);
    return (react_1.default.createElement("div", { className: "aksel-checkbox__input-wrapper", "data-standalone": standalone, "data-compact": compact },
        react_1.default.createElement("input", Object.assign({}, rest, { className: (0, helpers_1.cl)("aksel-checkbox__input", className), type: "checkbox", ref: mergedRef })),
        react_1.default.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 13 10", fill: "none", focusable: false, role: "img", "aria-hidden": true, className: "aksel-checkbox__icon" },
            react_1.default.createElement("path", { d: "M4.03524 6.41478L10.4752 0.404669C11.0792 -0.160351 12.029 -0.130672 12.5955 0.47478C13.162 1.08027 13.1296 2.03007 12.5245 2.59621L5.02111 9.59934C4.74099 9.85904 4.37559 10 4.00025 10C3.60651 10 3.22717 9.84621 2.93914 9.56111L0.439143 7.06111C-0.146381 6.47558 -0.146381 5.52542 0.439143 4.93989C1.02467 4.35437 1.97483 4.35437 2.56036 4.93989L4.03524 6.41478Z", fill: "currentColor" }))));
});
exports.CheckboxInput = CheckboxInput;
//# sourceMappingURL=CheckboxInput.js.map