"use client"; import { useTranslation } from "react-i18next"; import { Button } from "@kandev/ui/button"; import { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle, } from "@kandev/ui/dialog"; import { MobilePickerSheet } from "@/components/task/mobile/mobile-picker-sheet"; import { useResponsiveBreakpoint } from "@/hooks/use-responsive-breakpoint"; import type { useTaskFolderAction } from "@/hooks/use-task-folder-action"; export function TaskFolderPicker({ action }: { action: ReturnType }) { const { t } = useTranslation(); const { isMobile, isFinePointer } = useResponsiveBreakpoint(); const touch = isMobile || !isFinePointer; const choices = (
{action.options.map((option) => ( ))}
); const title = t("editors:chooseFolder"); const description = t("editors:openFolderOnHost"); if (touch) { return ( {choices} ); } return ( {title} {description}
{choices}
); }