import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import React from "react";
import { Circle } from "lucide-react";
export var DecimalPrecisionType;
(function(DecimalPrecisionType) {
    DecimalPrecisionType[DecimalPrecisionType["ZERO"] = 0] = "ZERO";
    DecimalPrecisionType[DecimalPrecisionType["ONE"] = 1] = "ONE";
    DecimalPrecisionType[DecimalPrecisionType["TWO"] = 2] = "TWO";
})(DecimalPrecisionType || (DecimalPrecisionType = {}));
export const DecimalPrecisionCheckbox = ({ value, onValueChange })=>{
    return /*#__PURE__*/ _jsxs("div", {
        className: "orderly-flex orderly-items-center orderly-space-x-3",
        children: [
            /*#__PURE__*/ _jsx(DecimalPrecisionItem, {
                active: value === 0,
                label: "1",
                value: 0,
                onClick: onValueChange
            }),
            /*#__PURE__*/ _jsx(DecimalPrecisionItem, {
                active: value === 1,
                label: "0.1",
                value: 1,
                onClick: onValueChange
            }),
            /*#__PURE__*/ _jsx(DecimalPrecisionItem, {
                active: value === 2,
                label: "0.01",
                value: 2,
                onClick: onValueChange
            })
        ]
    });
};
const DecimalPrecisionItem = (props)=>{
    let clsName = "orderly-flex orderly-items-center orderly-gap-1 orderly-cursor-pointer";
    if (props.active) {
        clsName += " orderly-text-base-contrast";
    } else {
        clsName += " orderly-text-base-contrast-54";
    }
    return /*#__PURE__*/ _jsxs("div", {
        className: clsName,
        onClick: ()=>{
            props.onClick(props.active ? "" : props.value);
        },
        children: [
            /*#__PURE__*/ _jsx("button", {
                type: "button",
                className: "orderly-w-[14px] orderly-h-[14px] orderly-rounded-full orderly-border-2 orderly-border-base-contrast-20",
                children: props.active && // @ts-ignore
                /*#__PURE__*/ _jsx(Circle, {
                    className: "orderly-w-[10px] orderly-h-[10px] orderly-text-base-contrast orderly-bg-base-contrast orderly-rounded-full"
                })
            }),
            /*#__PURE__*/ _jsx("span", {
                className: "orderly-text-3xs",
                children: props.label
            })
        ]
    });
};

//# sourceMappingURL=decimalPrecisionCheckBox.js.map