import { forwardRef } from 'react';
import Option from '../common/Option/Option.mjs';
import { jsx } from 'react/jsx-runtime';
import CheckboxButton from '../checkboxButton/CheckboxButton.mjs';

const CheckboxOption = /*#__PURE__*/forwardRef(({
  checked,
  disabled,
  onChange,
  ...rest
}, reference) => {
  return /*#__PURE__*/jsx(Option, {
    ...rest,
    ref: reference,
    disabled: disabled,
    button: /*#__PURE__*/jsx(CheckboxButton, {
      checked: checked,
      disabled: disabled,
      onChange: () => onChange?.(!checked)
    })
  });
});

export { CheckboxOption as default };
//# sourceMappingURL=CheckboxOption.mjs.map
