1 import { c } from 'ttag';
3 import { Button } from '@proton/atoms';
4 import { Alert, ModalTwoContent, ModalTwoFooter, ModalTwoHeader, PrimaryButton } from '@proton/components';
6 import type { DecryptedLink, TreeItem } from '../../../store';
7 import FolderTree from '../../FolderTree/FolderTree';
8 import EmptyFileTreePlaceholder from './EmptyFileTreePlaceholder';
10 export const ModalContent = ({
19 rootItems: TreeItem[];
21 isTreeLoaded: boolean;
22 selectedLinkId: string | undefined;
23 isSharingDisabled: boolean;
25 toggleExpand: (linkId: string) => void;
26 onSelect: (link: DecryptedLink) => void;
28 if (rootItems.length === 0) {
31 <ModalTwoHeader closeButtonProps={{ disabled: isLoading }} />
32 <EmptyFileTreePlaceholder />
39 <ModalTwoHeader title={c('Action').t`Share item`} closeButtonProps={{ disabled: isLoading }} />
41 <Alert className="mb-4">{c('Info')
42 .t`Select an uploaded file or folder and create a link to it.`}</Alert>
46 selectedItemId={selectedLinkId}
48 toggleExpand={toggleExpand}
52 <Button type="reset" className="w-custom" style={{ '--w-custom': '8em' }} disabled={isLoading}>
53 {c('Action').t`Cancel`}
56 className="ml-4 w-custom"
57 style={{ '--w-custom': '8em' }}
60 disabled={isSharingDisabled}