import { T9n } from 'features/T9n'

import { Notification } from './components/Notification'
import { useNewDevicePopup } from './hooks'

import {
  Button,
  Modal,
  Wrapper,
} from './styled'

export const NewDevicePopup = () => {
  const {
    close,
    isOpen,
  } = useNewDevicePopup()

  return (
    <Modal
      isOpen={isOpen}
      close={close}
      withCloseButton={false}
    >
      <Wrapper>
        <Notification />
        <Button onClick={close}>
          <T9n t='ok' />
        </Button>
      </Wrapper>
    </Modal>
  )
}
