projects/deliberation_at_scale/packages/frontend/components/EntityIcons/index.ts (63 lines of code) (raw):
import { MessageType } from '@/generated/graphql';
import { IconDefinition, IconName, IconPrefix } from '@fortawesome/fontawesome-svg-core';
export const groupSolid: IconDefinition = {
prefix: 'das-solid' as IconPrefix,
iconName: 'groupSolid' as IconName,
icon: [512, 512, [], "", "M368 128c0 61.856-50.144 112-112 112s-112-50.144-112-112S194.144 16 256 16s112 50.144 112 112ZM224 384c0 61.856-50.144 112-112 112S0 445.856 0 384s50.144-112 112-112 112 50.144 112 112ZM512 384c0 61.856-50.144 112-112 112s-112-50.144-112-112 50.144-112 112-112 112 50.144 112 112Z"]
};
export const groupRegular: IconDefinition = {
prefix: 'das-regular' as IconPrefix,
iconName: 'groupRegular' as IconName,
icon: [512, 512, [], "", "M256 224C317.856 224 368 173.856 368 112 368 50.144 317.856 0 256 0 194.144 0 144 50.144 144 112 144 173.856 194.144 224 256 224ZM320 112C320 147.346 291.346 176 256 176 220.654 176 192 147.346 192 112 192 76.654 220.654 48 256 48 291.346 48 320 76.654 320 112ZM112 480C173.856 480 224 429.856 224 368 224 306.144 173.856 256 112 256 50.144 256 0 306.144 0 368 0 429.856 50.144 480 112 480ZM176 368C176 403.346 147.346 432 112 432 76.654 432 48 403.346 48 368 48 332.654 76.654 304 112 304 147.346 304 176 332.654 176 368ZM512 368C512 429.856 461.856 480 400 480 338.144 480 288 429.856 288 368 288 306.144 338.144 256 400 256 461.856 256 512 306.144 512 368ZM400 432C435.346 432 464 403.346 464 368 464 332.654 435.346 304 400 304 364.654 304 336 332.654 336 368 336 403.346 364.654 432 400 432Z"]
};
export const personSolid: IconDefinition = {
prefix: 'das-solid' as IconPrefix,
iconName: 'personSolid' as IconName,
icon: [512, 512, [], "", "M512 256c0 141.385-114.615 256-256 256S0 397.385 0 256 114.615 0 256 0s256 114.615 256 256Z"]
};
export const personRegular: IconDefinition = {
prefix: 'das-regular' as IconPrefix,
iconName: 'personRegular' as IconName,
icon: [512, 512, [], "", "M 256,0 C 114.89952,0 0,114.89952 0,256 0,397.10048 114.89952,512 256,512 397.10048,512 512,397.10048 512,256 512,114.89952 397.10048,0 256,0 Z m 0,48 c 115.15938,0 208,92.84062 208,208 0,115.15938 -92.84062,208 -208,208 C 140.84062,464 48,371.15938 48,256 48,140.84062 140.84062,48 256,48 Z"]
};
export const statementSolid: IconDefinition = {
prefix: 'das-solid' as IconPrefix,
iconName: 'statementSolid' as IconName,
icon: [512, 512, [], "", "M0 48C0 21.49 21.49 0 48 0h416c26.51 0 48 21.49 48 48v416c0 26.51-21.49 48-48 48H48c-26.51 0-48-21.49-48-48V48Z"]
};
export const statementRegular: IconDefinition = {
prefix: 'das-regular' as IconPrefix,
iconName: 'statementRegular' as IconName,
icon: [512, 512, [], "", "M 72,0 C 32.519809,0 0,32.519809 0,72 v 368 c 0,39.48019 32.519809,72 72,72 h 368 c 39.48019,0 72,-32.51981 72,-72 V 72 C 512,32.519809 479.48019,0 440,0 Z m 0,48 h 368 c 13.53909,0 24,10.460908 24,24 v 368 c 0,13.53909 -10.46091,24 -24,24 H 72 C 58.460908,464 48,453.53909 48,440 V 72 C 48,58.460908 58.460908,48 72,48 Z"]
};
export const topicSolid: IconDefinition = {
prefix: 'das-solid' as IconPrefix,
iconName: 'topicSolid' as IconName,
icon: [512, 512, [], "", "M213.834 24.145c18.496-32.193 65.836-32.193 84.332 0L505.717 385.41c18.14 31.575-5.165 70.589-42.166 70.589H48.449c-37.001 0-60.306-39.014-42.166-70.589L213.834 24.145Z"]
};
export const topicRegular: IconDefinition = {
prefix: 'das-regular' as IconPrefix,
iconName: 'topicRegular' as IconName,
icon: [512, 512, [], "", "M255.999 21.73c-32.842 0-65.683 15.91-84.078 47.734L29.056 316.62l-16.294 28.193C-24.03 408.46 23.258 490.27 96.84 490.27H415.163c73.581 0 120.868-81.809 84.077-145.457L356.376 97.662l-16.294-28.198C321.686 37.64 288.84 21.73 255.999 21.73Zm0 46.474c16.377 0 32.756 8.413 42.487 25.246l16.3 28.198 142.863 247.15c19.46 33.665-3.566 73.5-42.487 73.5H96.84c-38.92 0-61.947-39.835-42.487-73.5l16.3-28.193L213.516 93.45c9.73-16.833 26.104-25.246 42.482-25.246z"]
};
export const aiSolid: IconDefinition = {
prefix: 'das-solid' as IconPrefix,
iconName: 'aiSolid' as IconName,
icon: [512, 512, [], "", "M149.291 454c-15.213 0-29.271-8.102-36.877-21.253L5.704 248.253a42.44 42.44 0 0 1 0-42.506l106.71-184.494C120.021 8.1 134.078 0 149.291 0h213.418c15.213 0 29.271 8.102 36.877 21.253l106.709 184.494a42.438 42.438 0 0 1 0 42.506L399.586 432.747C391.979 445.899 377.922 454 362.709 454H149.291Z"]
};
export const aiRegular: IconDefinition = {
prefix: 'das-regular' as IconPrefix,
iconName: 'aiRegular' as IconName,
icon: [512, 512, [], "", "M177.144 20.975c-35.078 0-67.586 18.78-85.126 49.178l-78.855 136.67c-17.54 30.397-17.54 67.957 0 98.355l78.855 136.67c17.54 30.397 50.048 49.177 85.126 49.177h157.712c35.078 0 67.586-18.78 85.126-49.178l78.855-136.67c17.54-30.397 17.54-67.957 0-98.355l-78.855-136.67c-17.54-30.397-50.048-49.177-85.126-49.177Zm0 48.016h157.712a50.21 50.21 0 0 1 43.57 25.17l78.856 136.668a50.276 50.276 0 0 1 0 50.342L378.426 417.84a50.21 50.21 0 0 1-43.57 25.169H177.144a50.21 50.21 0 0 1-43.57-25.17L54.718 281.172a50.276 50.276 0 0 1 0-50.342L133.574 94.16a50.21 50.21 0 0 1 43.57-25.169z"]
};
export function getIconByMessageType(type: MessageType) {
switch (type) {
case MessageType.Bot:
return aiSolid;
case MessageType.Chat:
return personSolid;
case MessageType.Voice:
return personSolid;
}
return personSolid;
}