import React, { FC } from 'react'
import { EnvironmentalData, LeadTime } from '../model/models'

export declare interface GeneralShippingOptionProps {
  leadTime: LeadTime | undefined
  serviceDescription: string
  environmentalData: EnvironmentalData | undefined
}

const GeneralShippingOption: FC<GeneralShippingOptionProps> = ({
  leadTime,
  serviceDescription,
  environmentalData,
}) => {
  return (
    <div>
      {leadTime?.description && (
        <p className="mbm leadtime">{leadTime?.description}</p>
      )}
      <p className="service_description">{serviceDescription}</p>
      {environmentalData?.fossilFree && (
        <div className="environmental mtm">
          <img src={environmentalData.tagUrl} alt="" data-testid="env_logo" />
        </div>
      )}
    </div>
  )
}

export default GeneralShippingOption
