import React from 'react'
import { FormattedText } from '../../../../FormattedText'

interface Props {
  day: number
  month: number
  data: VixonicData
}

export const TextDate: React.FunctionComponent<Props> = ({ day, month, data }: Props) => {
  const { dateMonthFormat, dateDayFormat } = data.parameters

  return (
    <div style={{ display: 'flex', alignItems: 'center' }}>
      <FormattedText text={`${day}/`} format={dateDayFormat} />
      <FormattedText text={`${month}`} format={dateMonthFormat} />
    </div>
  )
}
