import {
useFormControl
} from "./chunk-RWNNQZB4.js";
import {
ButtonBase_default
} from "./chunk-HNSRUHMS.js";
import {
init_useControlled,
useControlled_default
} from "./chunk-BLZ7IT4I.js";
import {
createSvgIcon,
init_createSvgIcon
} from "./chunk-Z7Q7P4A6.js";
import {
capitalize_default,
init_capitalize
} from "./chunk-D6IPQDTP.js";
import {
init_refType,
refType_default
} from "./chunk-VA2N3UVE.js";
import {
_extends,
_objectWithoutPropertiesLoose,
composeClasses,
generateUtilityClass,
generateUtilityClasses,
init_composeClasses,
init_extends,
init_generateUtilityClass,
init_generateUtilityClasses,
init_objectWithoutPropertiesLoose,
init_styled,
init_useThemeProps2 as init_useThemeProps,
require_colorManipulator,
rootShouldForwardProp,
styled_default,
useThemeProps2 as useThemeProps
} from "./chunk-7JF2SDS5.js";
import {
require_prop_types
} from "./chunk-4CB2EIFM.js";
import {
clsx_default,
init_clsx
} from "./chunk-AX45CUQC.js";
import {
require_jsx_runtime
} from "./chunk-DT77FM6J.js";
import {
require_react
} from "./chunk-4D5CYJYK.js";
import {
__toESM
} from "./chunk-CEQRFMJQ.js";
// node_modules/@mui/material/Checkbox/Checkbox.js
init_objectWithoutPropertiesLoose();
init_extends();
var React5 = __toESM(require_react());
var import_prop_types2 = __toESM(require_prop_types());
init_clsx();
init_refType();
init_composeClasses();
var import_colorManipulator = __toESM(require_colorManipulator());
// node_modules/@mui/material/internal/SwitchBase.js
init_objectWithoutPropertiesLoose();
init_extends();
var React = __toESM(require_react());
var import_prop_types = __toESM(require_prop_types());
init_clsx();
init_refType();
init_composeClasses();
init_capitalize();
init_styled();
init_useControlled();
// node_modules/@mui/material/internal/switchBaseClasses.js
init_generateUtilityClasses();
init_generateUtilityClass();
function getSwitchBaseUtilityClass(slot) {
return generateUtilityClass("PrivateSwitchBase", slot);
}
var switchBaseClasses = generateUtilityClasses("PrivateSwitchBase", ["root", "checked", "disabled", "input", "edgeStart", "edgeEnd"]);
// node_modules/@mui/material/internal/SwitchBase.js
var import_jsx_runtime = __toESM(require_jsx_runtime());
var import_jsx_runtime2 = __toESM(require_jsx_runtime());
var _excluded = ["autoFocus", "checked", "checkedIcon", "className", "defaultChecked", "disabled", "disableFocusRipple", "edge", "icon", "id", "inputProps", "inputRef", "name", "onBlur", "onChange", "onFocus", "readOnly", "required", "tabIndex", "type", "value"];
var useUtilityClasses = (ownerState) => {
const {
classes,
checked,
disabled,
edge
} = ownerState;
const slots = {
root: ["root", checked && "checked", disabled && "disabled", edge && `edge${capitalize_default(edge)}`],
input: ["input"]
};
return composeClasses(slots, getSwitchBaseUtilityClass, classes);
};
var SwitchBaseRoot = styled_default(ButtonBase_default)(({
ownerState
}) => _extends({
padding: 9,
borderRadius: "50%"
}, ownerState.edge === "start" && {
marginLeft: ownerState.size === "small" ? -3 : -12
}, ownerState.edge === "end" && {
marginRight: ownerState.size === "small" ? -3 : -12
}));
var SwitchBaseInput = styled_default("input", {
shouldForwardProp: rootShouldForwardProp
})({
cursor: "inherit",
position: "absolute",
opacity: 0,
width: "100%",
height: "100%",
top: 0,
left: 0,
margin: 0,
padding: 0,
zIndex: 1
});
var SwitchBase = React.forwardRef(function SwitchBase2(props, ref) {
const {
autoFocus,
checked: checkedProp,
checkedIcon,
className,
defaultChecked,
disabled: disabledProp,
disableFocusRipple = false,
edge = false,
icon,
id,
inputProps,
inputRef,
name,
onBlur,
onChange,
onFocus,
readOnly,
required = false,
tabIndex,
type,
value
} = props, other = _objectWithoutPropertiesLoose(props, _excluded);
const [checked, setCheckedState] = useControlled_default({
controlled: checkedProp,
default: Boolean(defaultChecked),
name: "SwitchBase",
state: "checked"
});
const muiFormControl = useFormControl();
const handleFocus = (event) => {
if (onFocus) {
onFocus(event);
}
if (muiFormControl && muiFormControl.onFocus) {
muiFormControl.onFocus(event);
}
};
const handleBlur = (event) => {
if (onBlur) {
onBlur(event);
}
if (muiFormControl && muiFormControl.onBlur) {
muiFormControl.onBlur(event);
}
};
const handleInputChange = (event) => {
if (event.nativeEvent.defaultPrevented) {
return;
}
const newChecked = event.target.checked;
setCheckedState(newChecked);
if (onChange) {
onChange(event, newChecked);
}
};
let disabled = disabledProp;
if (muiFormControl) {
if (typeof disabled === "undefined") {
disabled = muiFormControl.disabled;
}
}
const hasLabelFor = type === "checkbox" || type === "radio";
const ownerState = _extends({}, props, {
checked,
disabled,
disableFocusRipple,
edge
});
const classes = useUtilityClasses(ownerState);
return (0, import_jsx_runtime2.jsxs)(SwitchBaseRoot, _extends({
component: "span",
className: clsx_default(classes.root, className),
centerRipple: true,
focusRipple: !disableFocusRipple,
disabled,
tabIndex: null,
role: void 0,
onFocus: handleFocus,
onBlur: handleBlur,
ownerState,
ref
}, other, {
children: [(0, import_jsx_runtime.jsx)(SwitchBaseInput, _extends({
autoFocus,
checked: checkedProp,
defaultChecked,
className: classes.input,
disabled,
id: hasLabelFor ? id : void 0,
name,
onChange: handleInputChange,
readOnly,
ref: inputRef,
required,
ownerState,
tabIndex,
type
}, type === "checkbox" && value === void 0 ? {} : {
value
}, inputProps)), checked ? checkedIcon : icon]
}));
});
true ? SwitchBase.propTypes = {
/**
* If `true`, the `input` element is focused during the first mount.
*/
autoFocus: import_prop_types.default.bool,
/**
* If `true`, the component is checked.
*/
checked: import_prop_types.default.bool,
/**
* The icon to display when the component is checked.
*/
checkedIcon: import_prop_types.default.node.isRequired,
/**
* Override or extend the styles applied to the component.
*/
classes: import_prop_types.default.object,
/**
* @ignore
*/
className: import_prop_types.default.string,
/**
* @ignore
*/
defaultChecked: import_prop_types.default.bool,
/**
* If `true`, the component is disabled.
*/
disabled: import_prop_types.default.bool,
/**
* If `true`, the keyboard focus ripple is disabled.
* @default false
*/
disableFocusRipple: import_prop_types.default.bool,
/**
* If given, uses a negative margin to counteract the padding on one
* side (this is often helpful for aligning the left or right
* side of the icon with content above or below, without ruining the border
* size and shape).
* @default false
*/
edge: import_prop_types.default.oneOf(["end", "start", false]),
/**
* The icon to display when the component is unchecked.
*/
icon: import_prop_types.default.node.isRequired,
/**
* The id of the `input` element.
*/
id: import_prop_types.default.string,
/**
* [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.
*/
inputProps: import_prop_types.default.object,
/**
* Pass a ref to the `input` element.
*/
inputRef: refType_default,
/*
* @ignore
*/
name: import_prop_types.default.string,
/**
* @ignore
*/
onBlur: import_prop_types.default.func,
/**
* Callback fired when the state is changed.
*
* @param {object} event The event source of the callback.
* You can pull out the new checked state by accessing `event.target.checked` (boolean).
*/
onChange: import_prop_types.default.func,
/**
* @ignore
*/
onFocus: import_prop_types.default.func,
/**
* It prevents the user from changing the value of the field
* (not from interacting with the field).
*/
readOnly: import_prop_types.default.bool,
/**
* If `true`, the `input` element is required.
*/
required: import_prop_types.default.bool,
/**
* The system prop that allows defining system overrides as well as additional CSS styles.
*/
sx: import_prop_types.default.object,
/**
* @ignore
*/
tabIndex: import_prop_types.default.oneOfType([import_prop_types.default.number, import_prop_types.default.string]),
/**
* The input component prop `type`.
*/
type: import_prop_types.default.string.isRequired,
/**
* The value of the component.
*/
value: import_prop_types.default.any
} : void 0;
var SwitchBase_default = SwitchBase;
// node_modules/@mui/material/internal/svg-icons/CheckBoxOutlineBlank.js
var React2 = __toESM(require_react());
init_createSvgIcon();
var import_jsx_runtime3 = __toESM(require_jsx_runtime());
var CheckBoxOutlineBlank_default = createSvgIcon((0, import_jsx_runtime3.jsx)("path", {
d: "M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"
}), "CheckBoxOutlineBlank");
// node_modules/@mui/material/internal/svg-icons/CheckBox.js
var React3 = __toESM(require_react());
init_createSvgIcon();
var import_jsx_runtime4 = __toESM(require_jsx_runtime());
var CheckBox_default = createSvgIcon((0, import_jsx_runtime4.jsx)("path", {
d: "M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"
}), "CheckBox");
// node_modules/@mui/material/internal/svg-icons/IndeterminateCheckBox.js
var React4 = __toESM(require_react());
init_createSvgIcon();
var import_jsx_runtime5 = __toESM(require_jsx_runtime());
var IndeterminateCheckBox_default = createSvgIcon((0, import_jsx_runtime5.jsx)("path", {
d: "M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"
}), "IndeterminateCheckBox");
// node_modules/@mui/material/Checkbox/Checkbox.js
init_capitalize();
init_useThemeProps();
init_styled();
// node_modules/@mui/material/Checkbox/checkboxClasses.js
init_generateUtilityClasses();
init_generateUtilityClass();
function getCheckboxUtilityClass(slot) {
return generateUtilityClass("MuiCheckbox", slot);
}
var checkboxClasses = generateUtilityClasses("MuiCheckbox", ["root", "checked", "disabled", "indeterminate", "colorPrimary", "colorSecondary", "sizeSmall", "sizeMedium"]);
var checkboxClasses_default = checkboxClasses;
// node_modules/@mui/material/Checkbox/Checkbox.js
var import_jsx_runtime6 = __toESM(require_jsx_runtime());
var _excluded2 = ["checkedIcon", "color", "icon", "indeterminate", "indeterminateIcon", "inputProps", "size", "className"];
var useUtilityClasses2 = (ownerState) => {
const {
classes,
indeterminate,
color,
size
} = ownerState;
const slots = {
root: ["root", indeterminate && "indeterminate", `color${capitalize_default(color)}`, `size${capitalize_default(size)}`]
};
const composedClasses = composeClasses(slots, getCheckboxUtilityClass, classes);
return _extends({}, classes, composedClasses);
};
var CheckboxRoot = styled_default(SwitchBase_default, {
shouldForwardProp: (prop) => rootShouldForwardProp(prop) || prop === "classes",
name: "MuiCheckbox",
slot: "Root",
overridesResolver: (props, styles) => {
const {
ownerState
} = props;
return [styles.root, ownerState.indeterminate && styles.indeterminate, styles[`size${capitalize_default(ownerState.size)}`], ownerState.color !== "default" && styles[`color${capitalize_default(ownerState.color)}`]];
}
})(({
theme,
ownerState
}) => _extends({
color: (theme.vars || theme).palette.text.secondary
}, !ownerState.disableRipple && {
"&:hover": {
backgroundColor: theme.vars ? `rgba(${ownerState.color === "default" ? theme.vars.palette.action.activeChannel : theme.vars.palette[ownerState.color].mainChannel} / ${theme.vars.palette.action.hoverOpacity})` : (0, import_colorManipulator.alpha)(ownerState.color === "default" ? theme.palette.action.active : theme.palette[ownerState.color].main, theme.palette.action.hoverOpacity),
// Reset on touch devices, it doesn't add specificity
"@media (hover: none)": {
backgroundColor: "transparent"
}
}
}, ownerState.color !== "default" && {
[`&.${checkboxClasses_default.checked}, &.${checkboxClasses_default.indeterminate}`]: {
color: (theme.vars || theme).palette[ownerState.color].main
},
[`&.${checkboxClasses_default.disabled}`]: {
color: (theme.vars || theme).palette.action.disabled
}
}));
var defaultCheckedIcon = (0, import_jsx_runtime6.jsx)(CheckBox_default, {});
var defaultIcon = (0, import_jsx_runtime6.jsx)(CheckBoxOutlineBlank_default, {});
var defaultIndeterminateIcon = (0, import_jsx_runtime6.jsx)(IndeterminateCheckBox_default, {});
var Checkbox = React5.forwardRef(function Checkbox2(inProps, ref) {
var _icon$props$fontSize, _indeterminateIcon$pr;
const props = useThemeProps({
props: inProps,
name: "MuiCheckbox"
});
const {
checkedIcon = defaultCheckedIcon,
color = "primary",
icon: iconProp = defaultIcon,
indeterminate = false,
indeterminateIcon: indeterminateIconProp = defaultIndeterminateIcon,
inputProps,
size = "medium",
className
} = props, other = _objectWithoutPropertiesLoose(props, _excluded2);
const icon = indeterminate ? indeterminateIconProp : iconProp;
const indeterminateIcon = indeterminate ? indeterminateIconProp : checkedIcon;
const ownerState = _extends({}, props, {
color,
indeterminate,
size
});
const classes = useUtilityClasses2(ownerState);
return (0, import_jsx_runtime6.jsx)(CheckboxRoot, _extends({
type: "checkbox",
inputProps: _extends({
"data-indeterminate": indeterminate
}, inputProps),
icon: React5.cloneElement(icon, {
fontSize: (_icon$props$fontSize = icon.props.fontSize) != null ? _icon$props$fontSize : size
}),
checkedIcon: React5.cloneElement(indeterminateIcon, {
fontSize: (_indeterminateIcon$pr = indeterminateIcon.props.fontSize) != null ? _indeterminateIcon$pr : size
}),
ownerState,
ref,
className: clsx_default(classes.root, className)
}, other, {
classes
}));
});
true ? Checkbox.propTypes = {
// ┌────────────────────────────── Warning ──────────────────────────────┐
// │ These PropTypes are generated from the TypeScript type definitions. │
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
// └─────────────────────────────────────────────────────────────────────┘
/**
* If `true`, the component is checked.
*/
checked: import_prop_types2.default.bool,
/**
* The icon to display when the component is checked.
* @default
*/
checkedIcon: import_prop_types2.default.node,
/**
* Override or extend the styles applied to the component.
*/
classes: import_prop_types2.default.object,
/**
* @ignore
*/
className: import_prop_types2.default.string,
/**
* The color of the component.
* It supports both default and custom theme colors, which can be added as shown in the
* [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
* @default 'primary'
*/
color: import_prop_types2.default.oneOfType([import_prop_types2.default.oneOf(["default", "primary", "secondary", "error", "info", "success", "warning"]), import_prop_types2.default.string]),
/**
* The default checked state. Use when the component is not controlled.
*/
defaultChecked: import_prop_types2.default.bool,
/**
* If `true`, the component is disabled.
* @default false
*/
disabled: import_prop_types2.default.bool,
/**
* If `true`, the ripple effect is disabled.
* @default false
*/
disableRipple: import_prop_types2.default.bool,
/**
* The icon to display when the component is unchecked.
* @default
*/
icon: import_prop_types2.default.node,
/**
* The id of the `input` element.
*/
id: import_prop_types2.default.string,
/**
* If `true`, the component appears indeterminate.
* This does not set the native input element to indeterminate due
* to inconsistent behavior across browsers.
* However, we set a `data-indeterminate` attribute on the `input`.
* @default false
*/
indeterminate: import_prop_types2.default.bool,
/**
* The icon to display when the component is indeterminate.
* @default
*/
indeterminateIcon: import_prop_types2.default.node,
/**
* [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.
*/
inputProps: import_prop_types2.default.object,
/**
* Pass a ref to the `input` element.
*/
inputRef: refType_default,
/**
* Callback fired when the state is changed.
*
* @param {React.ChangeEvent} event The event source of the callback.
* You can pull out the new checked state by accessing `event.target.checked` (boolean).
*/
onChange: import_prop_types2.default.func,
/**
* If `true`, the `input` element is required.
* @default false
*/
required: import_prop_types2.default.bool,
/**
* The size of the component.
* `small` is equivalent to the dense checkbox styling.
* @default 'medium'
*/
size: import_prop_types2.default.oneOfType([import_prop_types2.default.oneOf(["medium", "small"]), import_prop_types2.default.string]),
/**
* The system prop that allows defining system overrides as well as additional CSS styles.
*/
sx: import_prop_types2.default.oneOfType([import_prop_types2.default.arrayOf(import_prop_types2.default.oneOfType([import_prop_types2.default.func, import_prop_types2.default.object, import_prop_types2.default.bool])), import_prop_types2.default.func, import_prop_types2.default.object]),
/**
* The value of the component. The DOM API casts this to a string.
* The browser uses "on" as the default value.
*/
value: import_prop_types2.default.any
} : void 0;
var Checkbox_default = Checkbox;
export {
SwitchBase_default,
getCheckboxUtilityClass,
checkboxClasses_default,
Checkbox_default
};
//# sourceMappingURL=chunk-X4MRYXZE.js.map