import { useLibraryMutation, useZodForm } from '@sd/client'; import { CheckBox, Dialog, Tooltip, useDialog, UseDialogProps } from '@sd/ui'; interface Props extends UseDialogProps { locationId: number; pathIds: number[]; } export default (props: Props) => { const deleteFile = useLibraryMutation('files.deleteFiles'); const form = useZodForm(); return ( deleteFile.mutateAsync({ location_id: props.locationId, file_path_ids: props.pathIds }) )} dialog={useDialog(props)} title="Delete a file" description="Warning: This will delete your file forever, we don't have a trash can yet..." loading={deleteFile.isLoading} ctaLabel="Delete" ctaDanger className="w-[200px]" >

Delete all matching files

); };