{"version":3,"file":"PublicationAlert-tfFwu8R9.js","sources":["../../../frontend/src/Components/Posts/Shared/PublicationAlert/PublicationAlert.tsx"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport { Chip, Typography } from '@mui/material';\nimport { FormattedMessage, FormattedDate } from 'react-intl';\nimport { Event, Visibility, VisibilityOff } from '@mui/icons-material';\n\nimport { moment } from '../../../../I18n';\nimport Alert from '../../../DesignSystem/Alert';\n\ninterface PublicationAlertProps {\n askToPublishAt?: string | null;\n publishedAt?: string | null;\n variant?: 'badge' | 'chip';\n}\n\nfunction PublicationAlert({\n askToPublishAt = null,\n publishedAt = null,\n variant = 'badge',\n}: PublicationAlertProps) {\n let label = ;\n let icon = ;\n\n if (publishedAt) {\n icon = ;\n label = (\n ,\n time: moment(publishedAt).format('LT'),\n }}\n />\n );\n } else if (askToPublishAt) {\n icon = ;\n label = (\n ,\n time: moment(askToPublishAt).format('LT'),\n }}\n />\n );\n }\n\n if (variant === 'chip') {\n return ;\n }\n\n return (\n \n {label}\n \n );\n}\n\nPublicationAlert.propTypes = {\n askToPublishAt: PropTypes.string,\n publishedAt: PropTypes.string,\n};\n\nexport default PublicationAlert;\n"],"names":["PublicationAlert","_ref","_ref$askToPublishAt","askToPublishAt","_ref$publishedAt","publishedAt","_ref$variant","variant","label","createElement","FormattedMessage","id","icon","React","VisibilityOff","Visibility","values","date","FormattedDate","value","time","moment","format","Event","Chip","size","Alert","severity","Typography","propTypes","PropTypes","string"],"mappings":"wSAeA,SAASA,EAAgBC,EAIC,CAAAC,IAAAA,EAAAD,EAHxBE,eAAAA,EAAcD,IAAG,OAAA,KAAIA,EAAAE,EAAAH,EACrBI,YAAAA,EAAWD,IAAG,OAAA,KAAIA,EAAAE,EAAAL,EAClBM,QAAAA,EAAOD,IAAG,OAAA,QAAOA,EAEbE,EAAQC,EAAAA,cAACC,EAAgB,CAACC,GAAG,uBAAA,CAAyB,EACtDC,EAAOC,EAAAJ,cAACK,MAAe,EA0B3B,OAxBIT,GACKQ,EAAAA,EAAAJ,cAACM,MAAY,EAElBF,EAAAA,EAAAJ,cAACC,EAAgB,CACfC,GAAG,8BACHK,OAAQ,CACNC,KAAMR,EAAAA,cAACS,EAAa,CAACC,MAAOd,CAAAA,CAAc,EAC1Ce,KAAMC,EAAOhB,CAAW,EAAEiB,OAAO,IAAI,CAAA,CACvC,CACD,GAEMnB,IACFU,EAAAA,EAAAJ,cAACc,MAAO,EAEbV,EAAAA,EAAAJ,cAACC,EAAgB,CACfC,GAAG,4BACHK,OAAQ,CACNC,KAAMR,EAAAA,cAACS,EAAa,CAACC,MAAOhB,CAAAA,CAAiB,EAC7CiB,KAAMC,EAAOlB,CAAc,EAAEmB,OAAO,IAAI,CAAA,CAC1C,CACD,GAIDf,IAAY,OACPM,EAAAJ,cAACe,EAAI,CAACZ,KAAAA,EAAYJ,MAAAA,EAAciB,KAAK,OAAA,CAAS,EAIrDZ,EAAAJ,cAACiB,EAAK,CAACC,SAAS,OAAOf,KAAAA,CAAAA,EACrBH,EAAAA,cAACmB,EAAU,CAACrB,QAAQ,OAAO,EAAEC,CAAkB,CAC1C,CAEX,CAEAR,EAAiB6B,UAAY,CAC3B1B,eAAgB2B,EAAUC,OAC1B1B,YAAayB,EAAUC,MACzB"}