{"version":3,"file":"FormCheckedProps.cjs","names":[],"sources":["../../src/FormCheckedProps.ts"],"sourcesContent":["/*!\n * Copyright (c) 2023-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport { SwitchBaseProps } from \"@mui/material/internal/SwitchBase.js\";\n\ntype SwitchOnChangeProp = Pick<SwitchBaseProps, \"onChange\">;\n\nexport type ControlledCheckedFieldProps<\n  TogglableInputElement extends SwitchOnChangeProp,\n> = {\n  /**\n   * Sets the checked state of the Checkbox\n   */\n  isChecked: boolean;\n  /**\n   * Determines whether the Checkbox is checked. Should not be used if `isChecked` is used\n   */\n  isDefaultChecked?: never;\n  /**\n   * The change event handler for the Checkbox. Must be used if `isChecked` is used\n   */\n  onChange: TogglableInputElement[\"onChange\"];\n};\n\nexport type UncontrolledCheckedFieldProps<\n  TogglableInputElement extends SwitchOnChangeProp,\n> = {\n  /**\n   * Sets the checked state of the Checkbox\n   */\n  isChecked?: never;\n  /**\n   * Determines whether the Checkbox is checked. Should not be used if `isChecked` is used\n   */\n  isDefaultChecked?: boolean;\n  /**\n   * The change event handler for the Checkbox. Must be used if `isChecked` is used\n   */\n  onChange?: TogglableInputElement[\"onChange\"];\n};\n\nexport type CheckedFieldProps<\n  TogglableInputElement extends SwitchOnChangeProp,\n> =\n  | ControlledCheckedFieldProps<TogglableInputElement>\n  | UncontrolledCheckedFieldProps<TogglableInputElement>;\n"],"mappings":"","ignoreList":[]}