package at.procon.eventhub.tachographfilesession.service;

final class VehicleUnitXmlSamples {

    private VehicleUnitXmlSamples() {
    }

    static String vehicleUnitXml() {
        return """
                <VehicleUnit>
                  <Overview>
                    <vehicleIdentificationNumber>VINVU123456789012</vehicleIdentificationNumber>
                    <vehicleRegistrationIdentification>
                      <vehicleRegistrationNation>12</vehicleRegistrationNation>
                      <vehicleRegistrationNumber><vehicleRegNumber>W-1000V</vehicleRegNumber></vehicleRegistrationNumber>
                    </vehicleRegistrationIdentification>
                    <vuDownloadablePeriod>
                      <minDownloadableTime>2026-04-01T00:00:00Z</minDownloadableTime>
                      <maxDownloadableTime>2026-04-02T10:00:00Z</maxDownloadableTime>
                    </vuDownloadablePeriod>
                  </Overview>
                  <Activities>
                    <vuCardIWData>
                      <vuCardIWRecords>
                        <cardHolderName>
                          <holderSurname><name>Muster</name></holderSurname>
                          <holderFirstNames><name>Max</name></holderFirstNames>
                        </cardHolderName>
                        <fullCardNumber>
                          <cardType>DRIVER_CARD</cardType>
                          <cardIssuingMemberState>12</cardIssuingMemberState>
                          <cardNumber>
                            <driverIdentification>123456789012</driverIdentification>
                            <cardReplacementIndex>0</cardReplacementIndex>
                            <cardRenewalIndex>0</cardRenewalIndex>
                          </cardNumber>
                          <generation>2</generation>
                        </fullCardNumber>
                        <cardExpiryDate>2031-04-01T00:00:00Z</cardExpiryDate>
                        <cardInsertionTime>2026-04-01T08:00:00Z</cardInsertionTime>
                        <vehicleOdometerValueAtInsertion>1000</vehicleOdometerValueAtInsertion>
                        <cardSlotNumber>DRIVER</cardSlotNumber>
                        <cardWithdrawalTime>2026-04-01T11:00:00Z</cardWithdrawalTime>
                        <vehicleOdometerValueAtWithdrawal>1100</vehicleOdometerValueAtWithdrawal>
                        <manualInputFlag>NO_ENTRY</manualInputFlag>
                      </vuCardIWRecords>
                      <vuCardIWRecords>
                        <cardHolderName>
                          <holderSurname><name>Test</name></holderSurname>
                          <holderFirstNames><name>Tina</name></holderFirstNames>
                        </cardHolderName>
                        <fullCardNumber>
                          <cardType>DRIVER_CARD</cardType>
                          <cardIssuingMemberState>12</cardIssuingMemberState>
                          <cardNumber>
                            <driverIdentification>999999999999</driverIdentification>
                            <cardReplacementIndex>1</cardReplacementIndex>
                            <cardRenewalIndex>1</cardRenewalIndex>
                          </cardNumber>
                          <generation>2</generation>
                        </fullCardNumber>
                        <cardInsertionTime>2026-04-02T07:30:00Z</cardInsertionTime>
                        <vehicleOdometerValueAtInsertion>1200</vehicleOdometerValueAtInsertion>
                        <cardSlotNumber>DRIVER</cardSlotNumber>
                        <manualInputFlag>MANUAL_ENTRIES</manualInputFlag>
                      </vuCardIWRecords>
                    </vuCardIWData>
                    <vuActivityDailyData>
                      <noOfActivityChanges>3</noOfActivityChanges>
                      <activityChangeInfos>
                        <slot>DRIVER</slot>
                        <drivingStatus>SINGLE</drivingStatus>
                        <cardStatus>INSERTED</cardStatus>
                        <activity>WORK</activity>
                        <timeOfChange>08:00:00Z</timeOfChange>
                      </activityChangeInfos>
                      <activityChangeInfos>
                        <slot>DRIVER</slot>
                        <drivingStatus>SINGLE</drivingStatus>
                        <cardStatus>INSERTED</cardStatus>
                        <activity>DRIVING</activity>
                        <timeOfChange>09:00:00Z</timeOfChange>
                      </activityChangeInfos>
                      <activityChangeInfos>
                        <slot>DRIVER</slot>
                        <drivingStatus>SINGLE</drivingStatus>
                        <cardStatus>INSERTED</cardStatus>
                        <activity>BREAK/REST</activity>
                        <timeOfChange>11:00:00Z</timeOfChange>
                      </activityChangeInfos>
                    </vuActivityDailyData>
                  </Activities>
                  <Activities>
                    <vuActivityDailyData>
                      <noOfActivityChanges>2</noOfActivityChanges>
                      <activityChangeInfos>
                        <slot>DRIVER</slot>
                        <drivingStatus>SINGLE</drivingStatus>
                        <cardStatus>INSERTED</cardStatus>
                        <activity>WORK</activity>
                        <timeOfChange>07:30:00Z</timeOfChange>
                      </activityChangeInfos>
                      <activityChangeInfos>
                        <slot>DRIVER</slot>
                        <drivingStatus>SINGLE</drivingStatus>
                        <cardStatus>INSERTED</cardStatus>
                        <activity>DRIVING</activity>
                        <timeOfChange>08:00:00Z</timeOfChange>
                      </activityChangeInfos>
                    </vuActivityDailyData>
                    <vuPlaceDailyWorkPeriodData>
                      <vuPlaceDailyWorkPeriodRecords>
                        <fullCardNumber>
                          <cardType>DRIVER_CARD</cardType>
                          <cardIssuingMemberState>12</cardIssuingMemberState>
                          <cardNumber>
                            <driverIdentification>123456789012</driverIdentification>
                            <cardReplacementIndex>0</cardReplacementIndex>
                            <cardRenewalIndex>0</cardRenewalIndex>
                          </cardNumber>
                          <generation>2</generation>
                        </fullCardNumber>
                        <placeRecord>
                          <entryTime>2026-04-01T08:00:00Z</entryTime>
                          <entryTypeDailyWorkPeriod>0</entryTypeDailyWorkPeriod>
                          <dailyWorkPeriodCountry>12</dailyWorkPeriodCountry>
                          <dailyWorkPeriodRegion>9</dailyWorkPeriodRegion>
                          <vehicleOdometerValue>1000</vehicleOdometerValue>
                          <entryGnssPlaceRecord>
                            <timeStamp>2026-04-01T08:00:00Z</timeStamp>
                            <gnssAccuracy>5</gnssAccuracy>
                            <geoCoordinates>
                              <latitude>48.2082</latitude>
                              <longitude>16.3738</longitude>
                            </geoCoordinates>
                            <authenticationStatus>AUTHENTICATED</authenticationStatus>
                          </entryGnssPlaceRecord>
                        </placeRecord>
                      </vuPlaceDailyWorkPeriodRecords>
                    </vuPlaceDailyWorkPeriodData>
                    <vuGnssADData>
                      <vuGnssADRecord>
                        <timeStamp>2026-04-02T08:00:00Z</timeStamp>
                        <cardNumberDriverSlot>
                          <cardType>DRIVER_CARD</cardType>
                          <cardIssuingMemberState>12</cardIssuingMemberState>
                          <cardNumber>
                            <driverIdentification>999999999999</driverIdentification>
                            <cardReplacementIndex>1</cardReplacementIndex>
                            <cardRenewalIndex>1</cardRenewalIndex>
                          </cardNumber>
                          <generation>2</generation>
                        </cardNumberDriverSlot>
                        <gnssPlaceRecord>
                          <timeStamp>2026-04-02T08:00:00Z</timeStamp>
                          <gnssAccuracy>4</gnssAccuracy>
                          <geoCoordinates>
                            <latitude>48012</latitude>
                            <longitude>16373</longitude>
                          </geoCoordinates>
                          <authenticationStatus>NOT_AUTHENTICATED</authenticationStatus>
                        </gnssPlaceRecord>
                        <vehicleOdometerValue>1210</vehicleOdometerValue>
                      </vuGnssADRecord>
                    </vuGnssADData>
                    <vuSpecificConditionData>
                      <specificConditionRecords>
                        <entryTime>2026-04-02T09:00:00Z</entryTime>
                        <specificConditionType>1</specificConditionType>
                      </specificConditionRecords>
                    </vuSpecificConditionData>
                  </Activities>
                </VehicleUnit>
                """;
    }

    static String vehicleUnitXmlWithLocalActivityTimes() {
        return vehicleUnitXml()
                .replace("<timeOfChange>08:00:00Z</timeOfChange>", "<timeOfChange>08:00:00</timeOfChange>")
                .replace("<timeOfChange>09:00:00Z</timeOfChange>", "<timeOfChange>09:00:00</timeOfChange>")
                .replace("<timeOfChange>11:00:00Z</timeOfChange>", "<timeOfChange>11:00:00</timeOfChange>")
                .replace("<timeOfChange>07:30:00Z</timeOfChange>", "<timeOfChange>07:30:00</timeOfChange>");
    }
}
