import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import React from "react";
import { Circle } from "lucide-react";
export var UnPnlPriceBasisType;
(function(UnPnlPriceBasisType) {
    UnPnlPriceBasisType[UnPnlPriceBasisType["MARKET_PRICE"] = 0] = "MARKET_PRICE";
    UnPnlPriceBasisType[UnPnlPriceBasisType["LAST_PRICE"] = 1] = "LAST_PRICE";
})(UnPnlPriceBasisType || (UnPnlPriceBasisType = {}));
export const UnPnlPriceBasisCheckBox = ({ value, onValueChange })=>{
    return /*#__PURE__*/ _jsxs("div", {
        className: "orderly-flex orderly-items-center orderly-space-x-3",
        children: [
            /*#__PURE__*/ _jsx(UnPnlPriceBasisItem, {
                active: value === 0,
                label: "Mark Price",
                value: 0,
                onClick: onValueChange
            }),
            /*#__PURE__*/ _jsx(UnPnlPriceBasisItem, {
                active: value === 1,
                label: "Last Price",
                value: 1,
                onClick: onValueChange
            })
        ]
    });
};
const UnPnlPriceBasisItem = (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=unPnlPriceBasisCheckBox.js.map