import {
  Filter
} from "./chunk-LAIAW5BT.js";
import {
  Radio
} from "./chunk-2W4UASAE.js";
import {
  __spreadProps,
  __spreadValues
} from "./chunk-W7FAWX6T.js";

// src/components/DataManagerTable/BooleanFilter.tsx
import { Fragment, jsx } from "@emotion/react/jsx-runtime";
var isBooleanFilterState = (state) => state.type === "boolean" /* BOOLEAN */;
var getDefaultBooleanFilterState = () => ({
  type: "boolean" /* BOOLEAN */,
  value: void 0,
  isApplied: false
});
var BooleanFilter = ({
  updateFilterState,
  state,
  label
}) => {
  return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(Filter, { label, children: /* @__PURE__ */ jsx(
    Radio,
    {
      radioOptions: [
        { label: "Yes" /* YES */ },
        { label: "No" /* NO */ },
        { label: "Both" /* BOTH */ }
      ],
      defaultOption: "Both" /* BOTH */,
      onChange: (selectedOption) => {
        updateFilterState(__spreadProps(__spreadValues({}, state), {
          value: selectedOption === "Yes" /* YES */ ? true : selectedOption === "No" /* NO */ ? false : void 0,
          isApplied: true
        }));
      }
    }
  ) }) });
};

export {
  isBooleanFilterState,
  getDefaultBooleanFilterState,
  BooleanFilter
};
