import styled from '@emotion/styled'; import { navigateWithClientInfo, useAuth } from '@tempi/auth'; import { t, useEditorTracking } from '@tempi/editor-site'; import { Button, Modal, Typography, Image, ModalProps } from 'antd'; import discountSvg from 'assets/images/discount.svg'; import React, { SetStateAction } from 'react'; interface ExpireLicenseModalProps extends Pick { open: boolean; setOpen?: React.Dispatch>; title: string | React.ReactNode; description: string; contentName: string; width?: number; } const { flagHiddenUpgradePlan } = window.config || {}; export const ExpireLicenseModal: React.FC = ({ open, setOpen, maskClosable, title, description, contentName, width = 360, ...rest }) => { const { getAttrTracking } = useEditorTracking(); const { currentMerchant } = useAuth(); const handleClickBtnUpgrade = () => { navigateWithClientInfo({ origin: window.config?.tempiDomain, path: '/pricing', objSearchParams: { referer: window.location.href, }, target: '_self', }); }; return ( setOpen(false)} width={width} bodyStyle={{ padding: 32, textAlign: 'center' }} {...rest} > {title} {!flagHiddenUpgradePlan && ( <> {description} )} ); }; const StyledModal = styled(Modal)` .ant-modal-content { padding: 0; border-radius: 8px !important; } `;