1 import type { CSSProperties, FC } from 'react';
3 import { c } from 'ttag';
5 import { Checkbox, Loader } from '@proton/components';
10 showSeparatorLine: boolean;
11 onSelect: (isSelected: boolean) => void;
12 selected: boolean | 'some';
16 export const PhotosGroup: FC<Props> = ({ style, text, showSeparatorLine, onSelect, selected, isLoading }) => {
20 data-testid="month-text"
21 className="text-semibold text-no-wrap text-capitalize py-3 flex items-center flex-nowrap"
26 data-testid="photos-group-checkbox"
27 indeterminate={selected === 'some'}
29 if (selected === 'some') {
35 // Note: browsers combine aria-label and the actual label, the translation string is correct
37 // translator: Used by screen readers to provide context for Photos groups (e.g. Select all items for September)
38 c('Info').t`Select all items for`
43 {isLoading && <Loader className="ml-2 flex items-center" />}
44 {showSeparatorLine && <hr className="w-full m-0 ml-3 h-0 border-bottom border-weak" />}