{"version":3,"file":"TagsInput-BM25WNjb.js","sources":["../../../app/javascript/hooks/selectors.tsx","../../../app/javascript/components/templates/operations/mailOperations/Tag.tsx","../../../app/javascript/components/templates/operations/mailOperations/TagsInput.tsx"],"sourcesContent":["export const classSelectors = {\n wrapper: \"react-tag-input\",\n input: \"react-tag-input__input\",\n tag: \"react-tag-input__tag\",\n tagContent: \"react-tag-input__tag__content\",\n tagRemove: \"react-tag-input__tag__remove\",\n tagRemoveReadOnly: \"react-tag-input__tag__remove-readonly\",\n};\n","import React from \"react\";\nimport { classSelectors } from \"../../../../hooks/selectors\";\nimport { getImageUrl } from \"../../../../commons/assets_path\";\n\ninterface Props {\n value: { id?: number; display_name: string; test_value?: string; icon_path?: string };\n index: number;\n readOnly: boolean;\n remove: (i: number) => void;\n}\n\nexport function Tag(props: Props) {\n const remove = () => props.remove(props.index);\n const { value, readOnly } = props;\n\n const tagRemoveClass = !readOnly\n ? classSelectors.tagRemove\n : `${classSelectors.tagRemove} ${classSelectors.tagRemoveReadOnly}`;\n\n return (\n
\n {value.test_value}\n
\n )}\n