<?xml version="1.0" encoding="UTF-8"?>
<!--
   Copyright 2022-2026 DATA @ UHN. See the NOTICE file
   distributed with this work for additional information
   regarding copyright ownership.

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <parent>
    <groupId>io.uhndata.cards</groupId>
    <artifactId>yourexperience-parent</artifactId>
    <version>1.2.1</version>
  </parent>

  <artifactId>yourexperience-resources</artifactId>
  <packaging>bundle</packaging>
  <name>YourExperience - Resources</name>

  <build>
    <resources>
      <resource>
        <directory>src/main/resources</directory>
      </resource>
      <resource>
        <directory>src/main/filteredresources</directory>
        <filtering>true</filtering>
      </resource>
    </resources>
    <plugins>
      <!-- This is an OSGi bundle -->
      <plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
        <extensions>true</extensions>
        <configuration>
          <instructions>
            <Include-Resource>{maven-resources},src/main/media</Include-Resource>
            <Sling-Initial-Content>
              SLING-INF/content/Survey/ED.xml;path:=/Survey/ED;overwrite:=true,
              SLING-INF/content/Survey/AIP.xml;path:=/Survey/AIP;overwrite:=true,
              SLING-INF/content/Survey/EDIP.xml;path:=/Survey/EDIP;overwrite:=true,
              SLING-INF/content/Survey/CPES.xml;path:=/Survey/CPES;overwrite:=true,
              SLING-INF/content/Survey/IC.xml;path:=/Survey/IC;overwrite:=true,
              SLING-INF/content/Survey/EDIC.xml;path:=/Survey/EDIC;overwrite:=true,
              SLING-INF/content/Survey/IPIC.xml;path:=/Survey/IPIC;overwrite:=true,
              SLING-INF/content/Survey/EDIPIC.xml;path:=/Survey/EDIPIC;overwrite:=true,
              SLING-INF/content/Survey/Rehab.xml;path:=/Survey/Rehab;overwrite:=true,
              SLING-INF/content/Survey/YVM.xml;path:=/Survey/YVM;overwrite:=true,
              SLING-INF/content/Survey/OO.xml;path:=/Survey/OO;overwrite:=true,
              SLING-INF/content/Survey/OOIP.xml;path:=/Survey/OOIP;overwrite:=true,
              SLING-INF/content/Survey/OCPE.xml;path:=/Survey/OCPE;overwrite:=true,
              SLING-INF/content/Survey/ClinicMapping.xml;path:=/Survey/ClinicMapping;overwrite:=true,
              SLING-INF/content/Survey/PatientAccess.xml;path:=/Survey/PatientAccess;overwrite:=true,
              SLING-INF/content/Survey/TermsOfUse.xml;path:=/Survey/TermsOfUse;overwrite:=true,
              SLING-INF/content/Survey/SurveyInstructions.xml;path:=/Survey/SurveyInstructions;overwrite:=true,
              SLING-INF/content/Survey/DashboardSettings.xml;path:=/Survey/DashboardSettings;overwrite:=true,
              SLING-INF/content/Questionnaires/;path:=/Questionnaires/;overwriteProperties:=true;uninstall:=true;checkin:=true,
              SLING-INF/content/libs/cards/healthcheck/queryCountChecks/;path:=/libs/cards/healthcheck/queryCountChecks/;overwriteProperties:=true,
              SLING-INF/content/libs/cards/healthcheck/requiredProperties/;path:=/libs/cards/healthcheck/requiredProperties/;overwriteProperties:=true,
              SLING-INF/content/libs/cards/healthcheck/requiredServices/;path:=/libs/cards/healthcheck/requiredServices/;overwriteProperties:=true,
              SLING-INF/content/libs/cards/resources/media/prems/;path:=/libs/cards/resources/media/prems/;overwrite:=true;uninstall:=true,
              SLING-INF/content/libs/cards/conf/Media.json;path:=/libs/cards/conf/Media;overwriteProperties:=true,
              SLING-INF/content/libs/cards/conf/AppName.json;path:=/libs/cards/conf/AppName;overwrite:=true,
              SLING-INF/content/libs/cards/conf/AppVersion.json;path:=/libs/cards/conf/AppVersion;overwrite:=true,
              SLING-INF/content/libs/cards/conf/ThemeColor.json;path:=/libs/cards/conf/ThemeColor;overwrite:=true,
              SLING-INF/content/libs/cards/Questionnaire/;path:=/libs/cards/Questionnaire/;overwriteProperties:=true;uninstall:=true,
              SLING-INF/content/apps/cards/config/CopyAnswers;path:=/apps/cards/config/CopyAnswers;overwriteProperties:=true;uninstall:=true,
              SLING-INF/content/apps/cards/mailTemplates;path:=/apps/cards/mailTemplates;overwrite:=true,
              SLING-INF/content/apps/cards/clinics/CPES/mailTemplates;path:=/apps/cards/clinics/CPES/mailTemplates;overwrite:=true,
              SLING-INF/content/apps/cards/clinics/UHN-ED/mailTemplates;path:=/apps/cards/clinics/UHN-ED/mailTemplates;overwrite:=true,
              SLING-INF/content/apps/cards/clinics/UHN-IP/mailTemplates;path:=/apps/cards/clinics/UHN-IP/mailTemplates;overwrite:=true,
              SLING-INF/content/apps/cards/clinics/UHN-EDIP/mailTemplates;path:=/apps/cards/clinics/UHN-EDIP/mailTemplates;overwrite:=true,
              SLING-INF/content/apps/cards/clinics/UHN-IC/mailTemplates;path:=/apps/cards/clinics/UHN-IC/mailTemplates;overwrite:=true,
              SLING-INF/content/apps/cards/clinics/UHN-IC-ED/mailTemplates;path:=/apps/cards/clinics/UHN-IC-ED/mailTemplates;overwrite:=true,
              SLING-INF/content/apps/cards/clinics/UHN-IC-IP/mailTemplates;path:=/apps/cards/clinics/UHN-IC-IP/mailTemplates;overwrite:=true,
              SLING-INF/content/apps/cards/clinics/UHN-IC-EDIP/mailTemplates;path:=/apps/cards/clinics/UHN-IC-EDIP/mailTemplates;overwrite:=true,
              SLING-INF/content/apps/cards/clinics/UHN-Rehab/mailTemplates;path:=/apps/cards/clinics/UHN-Rehab/mailTemplates;overwrite:=true,
              SLING-INF/content/apps/cards/clinics/PMH-YVM/mailTemplates;path:=/apps/cards/clinics/PMH-YVM/mailTemplates;overwrite:=true,
              SLING-INF/content/apps/cards/clinics/PM-OO/mailTemplates;path:=/apps/cards/clinics/PM-OO/mailTemplates;overwrite:=true,
              SLING-INF/content/apps/cards/clinics/UHN-OC/mailTemplates;path:=/apps/cards/clinics/UHN-OC/mailTemplates;overwrite:=true,
              SLING-INF/content/apps/cards/clarityImport/YourExperience.xml;path:=/apps/cards/clarityImport/YourExperience;overwrite:=true,
              SLING-INF/content/apps/cards/clarityImport/YourExperienceBickleInpatients.xml;path:=/apps/cards/clarityImport/YourExperienceBickleInpatients;overwrite:=true,
              SLING-INF/content/apps/cards/clarityImport/UHNOutpatient.xml;path:=/apps/cards/clarityImport/UHNOutpatient;overwrite:=true,
              SLING-INF/content/apps/cards/clarityImport/PMH-YVM.xml;path:=/apps/cards/clarityImport/PMH-YVM;overwrite:=true,
              SLING-INF/content/apps/cards/clarityImport/PMH-OO.xml;path:=/apps/cards/clarityImport/PMH-OO;overwrite:=true,
              SLING-INF/content/apps/cards/clarityImport/DeathStatus.xml;path:=/apps/cards/clarityImport/DeathStatus;overwrite:=true,
              SLING-INF/content/apps/cards/clarityImport/InpatientStatus.xml;path:=/apps/cards/clarityImport/InpatientStatus;overwrite:=true,
            </Sling-Initial-Content>
          </instructions>
        </configuration>
      </plugin>
    </plugins>
  </build>

  <dependencies>
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>cards-patient-subject-type</artifactId>
      <version>${cards.version}</version>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>cards-visit-subject-type</artifactId>
      <version>${cards.version}</version>
      <scope>runtime</scope>
    </dependency>
  </dependencies>
</project>
