<template>
  <div id="Presentation">
    <LayoutContainer>
      <v-row class="mt-12">
        <v-col cols="4">
          <LayoutUISubTitle
            :iconSize="6"
            :iconColor="iconColor"
            :titleText="titleText"

          />
          <v-img src="/images/logiciels/school/screen.jpg" class="screen-img" />

          <div :style="{ backgroundColor: backgroundColor }" class="rectangle-4">
          <div :style="{ backgroundColor: circleColor }" class="black-circle">
            <div class="content-flex">
              <v-img
                :src="logoSrc"
                class="logo-manager"
              />
              <div class="pricing-details">
                <p class="pricing-small-text">{{ pricingFromText }}</p>
                <p class="pricing-big-text">
                  {{ pricingAmount }} <span class="smaller-text">{{ pricingPeriodText }}</span>
                </p>
                <p class="pricing-small-text">{{ pricingAnnouncementText }}</p>
              </div>
            </div>
          </div>
        </div>
        </v-col>

        <v-col cols="6"  v-if="!mdAndDown">
          <LayoutUITitle :title="presentationText.toolTitle" />
          <ul class="outil-ul ml-12 mt-6">
            <li class="outil-list" v-for="item in presentationText.toolList" :key="item">
              {{ item }}
            </li>
          </ul>

        </v-col>
      </v-row>

      <v-row class="row-custom">
        <v-col cols="4" />
        <v-col  cols="6">
          <h2 class="mt-12 ml-12">{{ presentationText.characteristicsTitle }}</h2>
            <div class="picto-container">
              <div class="picto-group" v-for="picto in pictoImages" :key="picto.text">
                <v-img :src="picto.src" class="picto-img" />
                <p class="picto-text" :style="{ color: pictoColor }">{{ picto.text }}</p>
              </div>
            </div>
        </v-col>

      </v-row>
    </LayoutContainer>
  </div>
</template>

<script setup>
import { computed, onMounted, ref } from 'vue';
import { useRoute } from 'vue-router';
const props = defineProps({
  pictoImages: {
    type: Array,
    default: () => []
  },
  pictoColor: {
    type: String,
    default: '#000000'
  },
  presentationText: {
    type: Object,
    default: () => ({
      toolTitle: 'Default Title',
      toolList: [],
      characteristicsTitle: 'Default Characteristics Title'
    })
  },
  // Ajouter de nouvelles props ici
  logoSrc: {
    type: String,
    default: '/images/logo_school_white.png' 
  },
  pricingFromText: {
    type: String,
    default: 'à partir de' 
  },
  pricingAmount: {
    type: String,
    default: '32,90€' 
  },
  pricingPeriodText: {
    type: String,
    default: '/mois'
  },
  pricingAnnouncementText: {
    type: String,
    default: 'payable annuellement' 
  },
  backgroundColor: {
    type: String,
    default: 'rgba(32, 147, 190, 0.2)'
  },
  circleColor: {
    type: String,
    default: '#091d20'
  }
});
const titleText = ref(''); 
const iconColor = ref(''); 

const route = useRoute();

onMounted(() => {
  if (route.path.includes('opentalent_artist')) {
    titleText.value = "Présentation d'Opentalent Artist";
    iconColor.value = '#fac20a'; 
  } else if (route.path.includes('opentalent_school')) {
    titleText.value = "Présentation d'Opentalent School";
    iconColor.value = 'rgba(32, 147, 190, 0.6)'; 
  }
});
</script>

<style scoped>

.row-custom {
  margin-top: -18rem;
}
.pricing-details {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100%;
  color: black;
  font-weight: 500;
  font-size: 1rem;
  margin-left: 7rem;
  margin-top: -1.5rem;
  width: 10rem;
}

.pricing-small-text {
  font-size: 0.6em;
}

.pricing-big-text {
  font-size: 1.6em;
  font-weight: bold;
}

.smaller-text {
  font-size: 0.6em;
}
.presentation-title {
  color: #071b1f;
  font-family: Barlow;
  font-size: 1rem;
  font-style: normal;
  font-weight: 600;
  line-height: 15px;
  letter-spacing: 1.8px;
  text-transform: uppercase;
}

.black-circle {
  border-radius: 3rem;
  background: #091d20;
  width: 7rem;
  height: 6rem;
}

.devis {
  font-weight: 500;
  font-size: 1rem;
  margin-left: 9rem;
  margin-top: -1rem;
  width: 7rem;
}

.logo-manager {
  top: 1.2rem;
  z-index: 1;
}
.rectangle-4 {
  width: 18rem;
  height: 6rem;
  background: rgba(32, 147, 190, 0.2);
  border-radius: 3rem;
  margin-left: 5rem;
  margin-top: 2rem;
}
.picto-text {
  font-weight: 300;
  font-size: 0.9rem;
  margin-top: -3rem;
  text-align: center;
  margin-right: 2rem;
  margin-left: 2rem;
}
.picto-container {
  display: flex;
  flex-direction: row;
  justify-content: space-around;
}

.picto-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-left: 1rem;
  margin-right: 1rem;
}

.icon-title {
  margin-right: 0.7rem;
  color: rgba(32, 147, 190, 0.6);
}

.text-square {
  margin-left: 2rem;
  margin-right: 2rem;
  margin-top: 0.9rem;
  text-align: center;
}

.icon {
  margin-top: 1rem;
}
.outil-title {
  font-weight: 600;
  font-size: 2.2rem;
  line-height: 18px;
  color: #091d20;
  margin-bottom: 4rem;
}

.outil-ul {
  font-family: "Barlow";
  margin-left: 1rem;
  font-weight: 300;
  font-size: 1rem;
  line-height: 1.5rem;
}

.icon-logiciel {
  color: rgba(32, 147, 190, 0.6);
  margin-right: 1rem;
}
.container-green {
  background: linear-gradient(180deg, rgba(14, 45, 50, 0) 26.84%, #0e2d32 100%),
    rgba(7, 27, 31, 0.3);
  height: 40rem;
}

.picto-container {
  display: flex;
  flex-direction: row;
}
.picto-img {
  width: 14rem;
  height: 14rem;
}

.title {
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: 600;
  font-size: 1.5rem;
  line-height: 18px;
  color: #091d20;
  width: 25rem;
  margin-left: 2rem;
}

.screen-img {
  margin-top: 2rem;
  margin-left: 3rem;
}
</style>

