import { ModalRoot, ModalContent, ModalOverlay, } from '../../elements/ModalPrimitives' import { Box, HStack, StyledLink, VStack, } from '../../elements/LayoutPrimitives' import { Button } from '../../elements/Button' import { StyledText } from '../../elements/StyledText' import { theme } from '../../tokens/stitches.config' import { useCopyLink } from '../../../lib/hooks/useCopyLink' import { CloseIcon } from '../../elements/images/CloseIcon' import { OmnivoreLogoIcon } from '../../elements/images/OmnivoreNameLogo' import { useState } from 'react' import { TwitterLogo, FacebookLogo } from '@phosphor-icons/react' type ShareType = 'link' | 'highlight' type ShareModalLayoutProps = { url: string type: ShareType modalTitle: string title: string description?: string onOpenChange: (open: boolean) => void children: React.ReactNode } export function ShareModalLayout(props: ShareModalLayoutProps): JSX.Element { const { copyLink, isLinkCopied } = useCopyLink(props.url, props.type) const [switchOn, setSwitchOn] = useState(false) const toggleSwitch = () => { setSwitchOn(!switchOn) } const iconColor = theme.colors.grayText.toString() return ( { event.preventDefault() }} css={{ overflow: 'auto', p: '0px', border: '1px solid $grayBorder', boxShadow: 'none', }} > {props.modalTitle} {props.children} Secret URL {switchOn && ( )} ) }