1 import { ThemeTypes } from '@proton/shared/lib/themes/themes';
2 import conversationFullSvgDark from '@proton/styles/assets/img/placeholders/inbox-cool-dark.svg';
3 import conversationFullSvgLight from '@proton/styles/assets/img/placeholders/inbox-cool-light.svg';
4 import conversationEmptySvgDark from '@proton/styles/assets/img/placeholders/inbox-empty-cool-dark.svg';
5 import conversationEmptySvgLight from '@proton/styles/assets/img/placeholders/inbox-empty-cool-light.svg';
6 import conversationEmptySvgWarm from '@proton/styles/assets/img/placeholders/inbox-empty-warm-light.svg';
7 import conversationSemiSvgDark from '@proton/styles/assets/img/placeholders/inbox-semi-cool-dark.svg';
8 import conversationSemiSvgLight from '@proton/styles/assets/img/placeholders/inbox-semi-cool-light.svg';
9 import conversationSemiSvgWarm from '@proton/styles/assets/img/placeholders/inbox-semi-warm-light.svg';
10 import conversationFullSvgWarm from '@proton/styles/assets/img/placeholders/inbox-warm-light.svg';
20 * Placeholders are theme dependant since the warmness of the grey depends on the theme.
21 * This method returns the appropriate src based on the theme the user has set.
22 * @param object containing the theme type information and the different image src.
23 * @returns the appropriate src based on the theme
25 export const getPlaceholderSrc = ({ theme, warmLight, coolLight, coolDark }: Params) => {
26 if (theme === ThemeTypes.Duotone || theme === ThemeTypes.Snow || theme === ThemeTypes.ContrastLight) {
30 if (theme === ThemeTypes.Classic || theme === ThemeTypes.Legacy) {
34 if (theme === ThemeTypes.Carbon || theme === ThemeTypes.Monokai || theme === ThemeTypes.ContrastDark) {
46 export const getInboxEmptyPlaceholder = ({ size, theme }: Temp) => {
48 return getPlaceholderSrc({
50 coolDark: conversationEmptySvgDark,
51 coolLight: conversationEmptySvgLight,
52 warmLight: conversationEmptySvgWarm,
57 return getPlaceholderSrc({
59 coolDark: conversationSemiSvgDark,
60 coolLight: conversationSemiSvgLight,
61 warmLight: conversationSemiSvgWarm,
65 return getPlaceholderSrc({
67 coolDark: conversationFullSvgDark,
68 coolLight: conversationFullSvgLight,
69 warmLight: conversationFullSvgWarm,