import React from "react"; // react hook form import { Controller, FieldError, Control } from "react-hook-form"; // ui import { CustomSelect } from "components/ui"; // icons import { Squares2X2Icon } from "@heroicons/react/24/outline"; import { ModuleStatusIcon } from "components/icons"; // types import type { IModule } from "types"; // constants import { MODULE_STATUS } from "constants/module"; type Props = { control: Control; error?: FieldError; }; export const ModuleStatusSelect: React.FC = ({ control, error }) => ( ( {value ? ( ) : ( )} {MODULE_STATUS.find((s) => s.value === value)?.label ?? ( Status )} } onChange={onChange} noChevron > {MODULE_STATUS.map((status) => (
{status.label}
))}
)} /> );