import React, {FC} from "react"; import {PopupWindow} from "../PopupWindow"; import {useAtom} from "jotai"; import {getDefaultClosedProUpgradePopupWindowState, ProUpgradePopupWindowIsOpen} from "./atoms"; import {getProUpgradeLabel, NonImplementedMessage, openProUpgradePage} from "./actions/NonImplementedMessage"; import {__} from "../globals"; export type ProUpgradePopupWindowProps = {} export const ProUpgradePopupWindow: FC = ({}) => { const [popupWindowState, setPopupWindowState] = useAtom(ProUpgradePopupWindowIsOpen) const content = popupWindowState.content ?? (() => ) const title = popupWindowState.title ?? __('Do more with Pro') const hasCustomContent = !!popupWindowState.content return ({ label: getProUpgradeLabel(), onClick: openProUpgradePage, }), } ]} screenId={1} defaultScreenId={1} setCurrentScreenId={() => {}} onClose={() => setPopupWindowState(getDefaultClosedProUpgradePopupWindowState())} /> }