'use client';
import React from 'react';
import { Check } from '../../../icons/Check/index.js';
import { Line } from '../../../icons/Line/index.js';
export const inputBaseClass = 'checkbox-input';
export const CheckboxInput = ({ id, name, AfterInput, BeforeInput, Label, checked, className, inputRef, onToggle, partialChecked, readOnly, required })=>{
    return /*#__PURE__*/ React.createElement("div", {
        className: [
            className,
            inputBaseClass,
            checked && `${inputBaseClass}--checked`,
            readOnly && `${inputBaseClass}--read-only`
        ].filter(Boolean).join(' ')
    }, /*#__PURE__*/ React.createElement("div", {
        className: `${inputBaseClass}__input`
    }, BeforeInput, /*#__PURE__*/ React.createElement("input", {
        "aria-label": "",
        defaultChecked: Boolean(checked),
        disabled: readOnly,
        id: id,
        name: name,
        onInput: onToggle,
        ref: inputRef,
        required: required,
        type: "checkbox"
    }), /*#__PURE__*/ React.createElement("span", {
        className: [
            `${inputBaseClass}__icon`,
            !checked && partialChecked ? 'check' : 'partial'
        ].filter(Boolean).join(' ')
    }, checked && /*#__PURE__*/ React.createElement(Check, null), !checked && partialChecked && /*#__PURE__*/ React.createElement(Line, null)), AfterInput), Label);
};

//# sourceMappingURL=Input.js.map