import React from 'react'; import * as Text from 'app/shared/components/text/text'; import cx from 'classnames'; const departamentIconDictionary = { general: 'icon-group', chartering: 'icon-clipboard-chart', finance: 'icon-finance-report', operations: 'icon-vessel-front', ['fuel optimisation']: 'icon-speedometer1', default: 'icon-clipboard-check', }; export interface Props { key: string; title: string; topics?:string; isSmall?: boolean; onClick: (departamentTitle: string) => void; } export const ContactDepartament = ({ key, title, topics, onClick, isSmall=false }: Props) => { const topicsArray = topics?.split(';'); const wrapperClassName = cx( { 'o-layout__item-6 o-layout__item-md-3 o-layout__item-xl-2 o-gutter-right o-gutter-top': !isSmall }, { 'o-gutter-right--small o-gutter-top--small o-gutter-sm-right o-gutter-sm-top': isSmall }, ); const iconClassName = cx( { 'u-display--none u-display-sm--block u-margin-right--small': isSmall }, ); const headlineClassName = cx( { 'u-margin-top--small u-margin-bottom--small': !isSmall }, ); const containerClassName = cx('o-layout u-full-height u-bg-color--background-primary rounded--panel u-cursor--pointer', { 'o-layout--vertical o-gutter-top--big o-gutter-left--medium o-gutter-right--medium o-gutter-bottom--big': !isSmall }, { 'o-layout--aligned o-gutter-top--small o-gutter-sm-top--medium o-gutter-left o-gutter-sm-left--medium o-gutter-right o-gutter-sm-right--medium o-gutter-bottom--small o-gutter-sm-bottom--medium': isSmall }, ); return <>