1 import { c } from 'ttag';
3 import { Icon, Loader } from '@proton/components';
5 import type { ShareInvitee } from '../../../../../store';
8 * Generates attributes for an address input item based on the loading state, error state, and email.
9 * This function is meant to be use with the adress autocomplete input.
11 export const getAddressInputItemAttributes = ({ isLoading, error, email, isExternal }: ShareInvitee) => {
14 icon: <Loader className="icon-size-4 pl-2 m-auto flex shrink-0" />,
20 <div className="flex items-center shrink-0 ml-2">
22 name="exclamation-circle-filled"
23 className="color-danger"
24 data-testid="invite-address-error"
28 iconTooltip: error.message,
37 <span className="inline-flex pl-2 shrink-0 my-auto">
38 <Icon size={4} name="lock-filled" className={'color-info'} data-testid="invite-address-ok" />
41 iconTooltip: c('Tooltip').t`Shared with end-to-end encryption`,