interface Props {
    episode: number;
    title: string;
    title_items	: string;
    description: string;
    guid: string;
    pubDate: string;
    duration: number;
    urlImg: string;
    fileSize: number;
    audio: string;
    webSite: string;
    nameCompanies: string;
}

export const Items = (data: Props) => {
        let item =`
        <item>
          <title><![CDATA[`+data.title+': '+data.title_items +`]]></title>
          <description><![CDATA[`+data.description+`]]></description>
          <link>`+data.webSite+'/podcast/'+data.guid+`</link>
          <guid isPermaLink="false">`+data.guid+`</guid>
          <pubDate>`+data.pubDate+`</pubDate>
          <enclosure url="`+data.webSite+'/audio/'+data.audio+`" length="`+data.fileSize+`" type="audio/mpeg"/>
          <itunes:title>`+data.title+': '+data.title_items +`</itunes:title>
          <itunes:summary>`+data.description+`</itunes:summary>
          <content:encoded>`+data.description+`</content:encoded>
          <itunes:explicit>no</itunes:explicit>
          <itunes:duration>`+data.duration+`</itunes:duration>
          <itunes:image href="`+data.webSite+'/img/'+data.urlImg+`"/>
          <itunes:episode>`+data.episode+`</itunes:episode>
          <itunes:season>1</itunes:season>
          <itunes:episodeType>full</itunes:episodeType>
        </item>`;
      return(item)
};
