import React, { useState } from "react"; import { useRouter } from "next/router"; // hooks import { useIssueDetail, useProject } from "hooks/store"; // components import { ParentIssuesListModal } from "components/issues"; // icons import { X } from "lucide-react"; // types import { TIssue, ISearchIssueResponse } from "@plane/types"; type Props = { onChange: (value: string) => void; issueDetails: TIssue | undefined; disabled?: boolean; }; export const SidebarParentSelect: React.FC = ({ onChange, issueDetails, disabled = false }) => { const [selectedParentIssue, setSelectedParentIssue] = useState(null); const { isParentIssueModalOpen, toggleParentIssueModal } = useIssueDetail(); const router = useRouter(); const { projectId, issueId } = router.query; // hooks const { getProjectById } = useProject(); return ( <> toggleParentIssueModal(false)} onChange={(issue) => { onChange(issue.id); setSelectedParentIssue(issue); }} issueId={issueId as string} projectId={projectId as string} /> ); };