import React from "react"; // ui import { CustomSelect } from "components/ui"; // icons import { BanknotesIcon, PlayIcon } from "@heroicons/react/24/outline"; // types import { UserAuth } from "types"; import useEstimateOption from "hooks/use-estimate-option"; // constants type Props = { value: number; onChange: (val: number) => void; userAuth: UserAuth; }; export const SidebarEstimateSelect: React.FC = ({ value, onChange, userAuth }) => { const isNotAllowed = userAuth.isGuest || userAuth.isViewer; const { isEstimateActive, estimatePoints } = useEstimateOption(); if (!isEstimateActive) return null; return (

Estimate

{estimatePoints?.find((e) => e.key === value)?.value ?? "Estimate points"}
} onChange={onChange} position="right" width="w-full" disabled={isNotAllowed} > {estimatePoints && estimatePoints.map((point) => ( <> {point.value} ))}
); };