import React from 'react'
import { StyleProp, ViewStyle } from 'react-native'
import { DspIcon } from '../components/DspIcon'
import { TitleWithInfo } from '../components/TitleWithInfo'

export function DspTitle({
  dsp,
  title,
  infoModalText,
  infoModalTitle,
  style,
  centerContent,
}: {
  dsp: string
  title: string
  infoModalText?: string
  infoModalTitle?: string
  style?: StyleProp<ViewStyle>
  centerContent?: React.ReactChild
}) {
  return (
    <TitleWithInfo
      icon={<DspIcon dspSlug={dsp} width={24} height={24} />}
      title={title}
      infoModalText={infoModalText}
      infoModalTitle={infoModalTitle}
      style={style}
      centerContent={centerContent}
    />
  )
}
