{"version":3,"file":"GeneralStore-CUlq_NjO.mjs","names":[],"sources":["../src/stores/GeneralStore.ts"],"sourcesContent":["import { Category } from \"@/stores/class/general/category\";\nimport { defineStore } from \"pinia\";\nimport { Podcast } from \"./class/general/podcast\";\nimport { Emission } from \"./class/general/emission\";\nimport { Playlist } from \"./class/general/playlist\";\nimport { Canal } from \"./class/radio/canal\";\n\ninterface GeneralState {\n  metaTitle: string;\n  platformEducation: boolean;\n  generalLogoUrl: string;\n  storedCategories: Array<Category>;\n  storedCategoriesOrga: Array<Category>;\n  isBeforeLive: boolean;\n  consentTcf: string | null;\n  contentToDisplay: Podcast | Emission | Playlist | Canal | null;\n}\nexport const useGeneralStore = defineStore(\"GeneralStore\", {\n  state: (): GeneralState => ({\n    metaTitle: \"Saooti Play\",\n    platformEducation: false,\n    generalLogoUrl: \"/img/logo_saooti_play_black.svg\",\n    storedCategories: [],\n    storedCategoriesOrga: [],\n    isBeforeLive: true,\n    consentTcf: null,\n    contentToDisplay: null,\n  }),\n  actions: {\n    contentToDisplayUpdate(\n      contentToDisplay: Podcast | Emission | Playlist | Canal | null,\n    ) {\n      this.contentToDisplay = contentToDisplay;\n    },\n    storedUpdateCategories(categories: Array<Category>) {\n      this.storedCategories = categories;\n    },\n    storedUpdateCategoriesOrga(categories: Array<Category>) {\n      this.storedCategoriesOrga = categories;\n    },\n    isBeforeLiveUpdate(isBeforeLive: boolean) {\n      this.isBeforeLive = isBeforeLive;\n    },\n    consentTcfUpdate(consentTcf: string | null) {\n      this.consentTcf = consentTcf;\n    },\n    platformUpdateEducation(isEducation: boolean) {\n      this.platformEducation = isEducation;\n      if (isEducation) {\n        this.generalLogoUrl = \"/img/logo_education.webp\";\n        this.metaTitle = \"RadioEducation.org\";\n      }\n    },\n    metaTitleUpdate(title: string) {\n      this.metaTitle = title;\n    },\n\n  },\n});\n"],"mappings":";;AAiBA,IAAa,kBAAkB,YAAY,gBAAgB;CACzD,cAA4B;EAC1B,WAAW;EACX,mBAAmB;EACnB,gBAAgB;EAChB,kBAAkB,CAAC;EACnB,sBAAsB,CAAC;EACvB,cAAc;EACd,YAAY;EACZ,kBAAkB;CACpB;CACA,SAAS;EACP,uBACE,kBACA;GACA,KAAK,mBAAmB;EAC1B;EACA,uBAAuB,YAA6B;GAClD,KAAK,mBAAmB;EAC1B;EACA,2BAA2B,YAA6B;GACtD,KAAK,uBAAuB;EAC9B;EACA,mBAAmB,cAAuB;GACxC,KAAK,eAAe;EACtB;EACA,iBAAiB,YAA2B;GAC1C,KAAK,aAAa;EACpB;EACA,wBAAwB,aAAsB;GAC5C,KAAK,oBAAoB;GACzB,IAAI,aAAa;IACf,KAAK,iBAAiB;IACtB,KAAK,YAAY;GACnB;EACF;EACA,gBAAgB,OAAe;GAC7B,KAAK,YAAY;EACnB;CAEF;AACF,CAAC"}