package zeenea.connector.bluetelligence.client.mapper;

import java.util.ArrayList;
import java.util.List;
import javax.annotation.processing.Generated;
import zeenea.connector.bluetelligence.client.Description;
import zeenea.connector.bluetelligence.client.xml.DescriptionXmlFile;

@Generated(
    value = "org.mapstruct.ap.MappingProcessor",
    date = "2025-10-02T11:42:42+0000",
    comments = "version: 1.6.3, compiler: IncrementalProcessingEnvironment from gradle-language-java-8.13.jar, environment: Java 11.0.28 (Eclipse Adoptium)"
)
public class DescriptionMapperImpl implements DescriptionMapper {

    @Override
    public List<Description> mapToDescription(List<DescriptionXmlFile> descriptionXmlFiles) {
        if ( descriptionXmlFiles == null ) {
            return new ArrayList<Description>();
        }

        List<Description> list = new ArrayList<Description>( descriptionXmlFiles.size() );
        for ( DescriptionXmlFile descriptionXmlFile : descriptionXmlFiles ) {
            list.add( descriptionXmlFileToDescription( descriptionXmlFile ) );
        }

        return list;
    }

    protected Description descriptionXmlFileToDescription(DescriptionXmlFile descriptionXmlFile) {
        if ( descriptionXmlFile == null ) {
            return null;
        }

        String language = null;
        String text = null;

        language = descriptionXmlFile.getLanguage();
        text = descriptionXmlFile.getText();

        Description description = new Description( language, text );

        return description;
    }
}
