import {BottomBar} from '@/components/dm/bottom-bar'
import {Text} from '@/components/ui/typography'
import {atoms as a, useTheme} from '@/sprinkles'

// shown in place of the composer when the thread is read-only: you're no longer
// friends with the peer, so the server would reject a send ("unfriending closes
// the channel"). the history stays visible above it
export const DmClosedBar = ({handle}: {handle: string}) => {
  const t = useTheme()
  return (
    <BottomBar style={a.align_center}>
      <Text
        style={[
          a.text_sm,
          a.text_center,
          t.atoms.text_contrast_medium,
        ]}
      >
        You can no longer message @{handle}
      </Text>
    </BottomBar>
  )
}
