{"version":3,"file":"MobileMenu-t86Zg0xp.mjs","names":[],"sources":["../src/components/misc/MobileMenu.vue","../src/components/misc/MobileMenu.vue"],"sourcesContent":["<template>\n  <div>\n    <button\n      v-show=\"show\"\n      id=\"mobile-menu-dropdown\"\n      class=\"btn-transparent text-white c-hand m-2 h2\"\n      :title=\"t('open left Menu')\"\n      @click=\"handleMenuClick\"\n    >\n      <MenuIcon :size=\"34\" />\n    </button>\n    <ClassicPopover\n      v-if=\"firstLoaded\"\n      target=\"mobile-menu-dropdown\"\n      popover-class=\"popover-z-index\"\n      :only-click=\"true\"\n      :is-fixed=\"true\"\n      :left-pos=\"true\"\n      :is-top-layer=\"true\"\n    >\n      <UserButtonContent \n        :isEducation=\"isEducation\" \n        :navLabel=\"t('User menu')\" \n        :specificRoutes=\"routerLinkArray\"\n        :displayUserContent=\"displayUserContent\"/>\n    </ClassicPopover>\n  </div>\n</template>\n\n<script setup lang=\"ts\">\nimport MenuIcon from \"vue-material-design-icons/Menu.vue\";\nimport { useRubriquesFilterComputed } from \"../composable/route/useRubriquesFilterComputed\";\nimport { state } from \"../../stores/ParamSdkStore\";\nimport { defineAsyncComponent, ref, computed } from \"vue\";\nimport { useFilterStore } from \"../../stores/FilterStore\";\nimport { useI18n } from \"vue-i18n\";\nimport { useResizePhone } from \"../composable/useResizePhone\";\nimport { useAuthStore } from \"../../stores/AuthStore\";\nconst ClassicPopover = defineAsyncComponent(\n  () => import(\"../misc/ClassicPopover.vue\"),\n);\nconst UserButtonContent = defineAsyncComponent(\n  () => import(\"./UserButtonContent.vue\"),\n);\n\n//Props \nconst props = defineProps({\n  isEducation: { default: false, type: Boolean },\n  show: { default: false, type: Boolean },\n  notPodcastAndEmission: { default: false, type: Boolean },\n  inContentDisplayPage: { default: false, type: Boolean },\n})\n\n//Data \nconst firstLoaded = ref(false);\n\n//Composables\nconst { t } = useI18n();\nconst { rubriqueQueryParam } = useRubriquesFilterComputed();\nconst filterStore = useFilterStore();\nconst authStore = useAuthStore();\nconst { windowWidth } = useResizePhone();\n\n\n//Computed\nconst isAuthenticatedWithOrga = computed(() => undefined !== authStore.authOrgaId);\nconst displayUserContent = computed(() =>{\n  if(isAuthenticatedWithOrga.value){\n    return 500>=windowWidth.value;\n  }\n  return props.show;\n});\nconst routerLinkArray = computed(() =>{\n  return [\n    { \n      title: t(\"Home\"),\n      path:{\n        name: \"home\",\n        query: getQueriesRouter(false),\n      },\n      class:\"octopus-dropdown-item show-phone-flex\", \n      condition: true\n    },\n    {\n      title: t(\"Radio & Live\"),\n      path:{\n        name: \"lives\",\n        query: getQueriesRouter(true),\n      },\n      class: \"octopus-dropdown-item\",\n      condition:\n        state.generalParameters.isLiveTab &&\n        ((filterStore.filterOrgaId && filterStore.filterLive) || !filterStore.filterOrgaId),\n    },\n    {\n      title: t(\"Podcasts\"),\n      path:{\n        name: \"podcasts\",\n        query: getQueriesRouter(false),\n      },\n      class: \"octopus-dropdown-item\",\n      condition: !props.notPodcastAndEmission,\n    },\n    {\n      title: t(\"Emissions\"),\n      path:{\n        name: \"emissions\",\n        query: getQueriesRouter(false),\n      },\n      class: \"octopus-dropdown-item\",\n      condition: !props.notPodcastAndEmission,\n    },\n    {\n      title: t(\"Productors\"),\n      path:{\n        name: \"productors\",\n        query: getQueriesRouter(true),\n      },\n      class: \"octopus-dropdown-item\",\n      condition:\n        !state.generalParameters.podcastmaker && (!filterStore.filterOrgaId || props.isEducation),\n    },\n    {\n      title: t(\"Playlists\"),\n      path:{\n        name: \"playlists\",\n        query: getQueriesRouter(true),\n      },\n      class: \"octopus-dropdown-item\",\n      condition: true,\n    },\n    {\n      title: t(\"Speakers\"),\n      path:{\n        name: \"participants\",\n        query: getQueriesRouter(true),\n      },\n      class: \"octopus-dropdown-item\",\n      condition: true,\n    },\n  ];\n});\n\n\n//Methods\nfunction handleMenuClick() {\n  if (firstLoaded.value) {\n    return;\n  }\n  firstLoaded.value = true;\n  setTimeout(() => {\n    document.getElementById(\"mobile-menu-dropdown\")?.click();\n  }, 200);\n}\nfunction getQueriesRouter(onlyProductor:boolean) {\n  if (onlyProductor) {\n    return { productor: filterStore.filterOrgaId };\n  }\n  return {\n    productor: filterStore.filterOrgaId,\n    iabId: filterStore.filterIab?.id,\n    rubriquesId: rubriqueQueryParam.value,\n  };\n}\n</script>\n","<template>\n  <div>\n    <button\n      v-show=\"show\"\n      id=\"mobile-menu-dropdown\"\n      class=\"btn-transparent text-white c-hand m-2 h2\"\n      :title=\"t('open left Menu')\"\n      @click=\"handleMenuClick\"\n    >\n      <MenuIcon :size=\"34\" />\n    </button>\n    <ClassicPopover\n      v-if=\"firstLoaded\"\n      target=\"mobile-menu-dropdown\"\n      popover-class=\"popover-z-index\"\n      :only-click=\"true\"\n      :is-fixed=\"true\"\n      :left-pos=\"true\"\n      :is-top-layer=\"true\"\n    >\n      <UserButtonContent \n        :isEducation=\"isEducation\" \n        :navLabel=\"t('User menu')\" \n        :specificRoutes=\"routerLinkArray\"\n        :displayUserContent=\"displayUserContent\"/>\n    </ClassicPopover>\n  </div>\n</template>\n\n<script setup lang=\"ts\">\nimport MenuIcon from \"vue-material-design-icons/Menu.vue\";\nimport { useRubriquesFilterComputed } from \"../composable/route/useRubriquesFilterComputed\";\nimport { state } from \"../../stores/ParamSdkStore\";\nimport { defineAsyncComponent, ref, computed } from \"vue\";\nimport { useFilterStore } from \"../../stores/FilterStore\";\nimport { useI18n } from \"vue-i18n\";\nimport { useResizePhone } from \"../composable/useResizePhone\";\nimport { useAuthStore } from \"../../stores/AuthStore\";\nconst ClassicPopover = defineAsyncComponent(\n  () => import(\"../misc/ClassicPopover.vue\"),\n);\nconst UserButtonContent = defineAsyncComponent(\n  () => import(\"./UserButtonContent.vue\"),\n);\n\n//Props \nconst props = defineProps({\n  isEducation: { default: false, type: Boolean },\n  show: { default: false, type: Boolean },\n  notPodcastAndEmission: { default: false, type: Boolean },\n  inContentDisplayPage: { default: false, type: Boolean },\n})\n\n//Data \nconst firstLoaded = ref(false);\n\n//Composables\nconst { t } = useI18n();\nconst { rubriqueQueryParam } = useRubriquesFilterComputed();\nconst filterStore = useFilterStore();\nconst authStore = useAuthStore();\nconst { windowWidth } = useResizePhone();\n\n\n//Computed\nconst isAuthenticatedWithOrga = computed(() => undefined !== authStore.authOrgaId);\nconst displayUserContent = computed(() =>{\n  if(isAuthenticatedWithOrga.value){\n    return 500>=windowWidth.value;\n  }\n  return props.show;\n});\nconst routerLinkArray = computed(() =>{\n  return [\n    { \n      title: t(\"Home\"),\n      path:{\n        name: \"home\",\n        query: getQueriesRouter(false),\n      },\n      class:\"octopus-dropdown-item show-phone-flex\", \n      condition: true\n    },\n    {\n      title: t(\"Radio & Live\"),\n      path:{\n        name: \"lives\",\n        query: getQueriesRouter(true),\n      },\n      class: \"octopus-dropdown-item\",\n      condition:\n        state.generalParameters.isLiveTab &&\n        ((filterStore.filterOrgaId && filterStore.filterLive) || !filterStore.filterOrgaId),\n    },\n    {\n      title: t(\"Podcasts\"),\n      path:{\n        name: \"podcasts\",\n        query: getQueriesRouter(false),\n      },\n      class: \"octopus-dropdown-item\",\n      condition: !props.notPodcastAndEmission,\n    },\n    {\n      title: t(\"Emissions\"),\n      path:{\n        name: \"emissions\",\n        query: getQueriesRouter(false),\n      },\n      class: \"octopus-dropdown-item\",\n      condition: !props.notPodcastAndEmission,\n    },\n    {\n      title: t(\"Productors\"),\n      path:{\n        name: \"productors\",\n        query: getQueriesRouter(true),\n      },\n      class: \"octopus-dropdown-item\",\n      condition:\n        !state.generalParameters.podcastmaker && (!filterStore.filterOrgaId || props.isEducation),\n    },\n    {\n      title: t(\"Playlists\"),\n      path:{\n        name: \"playlists\",\n        query: getQueriesRouter(true),\n      },\n      class: \"octopus-dropdown-item\",\n      condition: true,\n    },\n    {\n      title: t(\"Speakers\"),\n      path:{\n        name: \"participants\",\n        query: getQueriesRouter(true),\n      },\n      class: \"octopus-dropdown-item\",\n      condition: true,\n    },\n  ];\n});\n\n\n//Methods\nfunction handleMenuClick() {\n  if (firstLoaded.value) {\n    return;\n  }\n  firstLoaded.value = true;\n  setTimeout(() => {\n    document.getElementById(\"mobile-menu-dropdown\")?.click();\n  }, 200);\n}\nfunction getQueriesRouter(onlyProductor:boolean) {\n  if (onlyProductor) {\n    return { productor: filterStore.filterOrgaId };\n  }\n  return {\n    productor: filterStore.filterOrgaId,\n    iabId: filterStore.filterIab?.id,\n    rubriquesId: rubriqueQueryParam.value,\n  };\n}\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAsCA,MAAM,iBAAiB,2BACf,OAAO,iCAAA,MAAA,MAAA,EAAA,CAAA,CACf;EACA,MAAM,oBAAoB,2BAClB,OAAO,oCAAA,MAAA,MAAA,EAAA,CAAA,CACf;EAGA,MAAM,QAAQ;EAQd,MAAM,cAAc,IAAI,KAAK;EAG7B,MAAM,EAAE,MAAM,QAAQ;EACtB,MAAM,EAAE,uBAAuB,2BAA2B;EAC1D,MAAM,cAAc,eAAe;EACnC,MAAM,YAAY,aAAa;EAC/B,MAAM,EAAE,gBAAgB,eAAe;EAIvC,MAAM,0BAA0B,eAAe,KAAA,MAAc,UAAU,UAAU;EACjF,MAAM,qBAAqB,eAAc;GACvC,IAAG,wBAAwB,OACzB,OAAO,OAAK,YAAY;GAE1B,OAAO,MAAM;EACf,CAAC;EACD,MAAM,kBAAkB,eAAc;GACpC,OAAO;IACL;KACE,OAAO,EAAE,MAAM;KACf,MAAK;MACH,MAAM;MACN,OAAO,iBAAiB,KAAK;KAC/B;KACA,OAAM;KACN,WAAW;IACb;IACA;KACE,OAAO,EAAE,cAAc;KACvB,MAAK;MACH,MAAM;MACN,OAAO,iBAAiB,IAAI;KAC9B;KACA,OAAO;KACP,WACE,MAAM,kBAAkB,cACtB,YAAY,gBAAgB,YAAY,cAAe,CAAC,YAAY;IAC1E;IACA;KACE,OAAO,EAAE,UAAU;KACnB,MAAK;MACH,MAAM;MACN,OAAO,iBAAiB,KAAK;KAC/B;KACA,OAAO;KACP,WAAW,CAAC,MAAM;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