{"version":3,"names":["getCategories","async","module","page","categories","includeEmpty","exclude","C7MODULE","geo","client","GeoClient","calendar","CalendarClient","news","NewsClient","getCategoriesByModuleType","type","ModuleType","News","Geo","Calendar","Directory","DirectoryClient","getFormCategories","Database","DatabaseClient","Gallery","GalleryClient","Problem","ProblemClient","Shop","ShopClient","Booking","BookingClient"],"sources":["./src/utils/categories.ts"],"sourcesContent":["import {\n BookingClient,\n CalendarClient,\n CategoryTeaserDto,\n DatabaseClient,\n DirectoryClient,\n GalleryClient,\n GeoClient,\n ModuleType,\n NewsClient,\n ProblemClient, ShopClient,\n} from '../api/APIClient';\nimport { C7MODULE } from '../components/interfaces/component-properties';\n\nexport const getCategories = async (module: C7MODULE, page: number, categories: number[], includeEmpty: boolean, exclude: number[]): Promise => {\n\n if (module === C7MODULE.geo) {\n\n const client: GeoClient = new GeoClient();\n return await client.getCategories(page, includeEmpty, categories, exclude) as CategoryTeaserDto[];\n\n } else if (module === C7MODULE.calendar) {\n\n const client: CalendarClient = new CalendarClient();\n return await client.getCategories(page, includeEmpty, categories, exclude) as CategoryTeaserDto[];\n\n } else if (module === C7MODULE.news) {\n\n const client: NewsClient = new NewsClient();\n return await client.getCategories(page, includeEmpty, categories, exclude) as CategoryTeaserDto[];\n\n }\n\n}\n\nexport const getCategoriesByModuleType = async (type: ModuleType, page: number, categories: number[], exclude: number[], includeEmpty: boolean = false): Promise => {\n switch (type) {\n case ModuleType.News:\n return await new NewsClient().getCategories(page, includeEmpty, categories, exclude);\n case ModuleType.Geo:\n return await new GeoClient().getCategories(page, includeEmpty, categories, exclude);\n case ModuleType.Calendar:\n return await new CalendarClient().getCategories(page, includeEmpty, categories, exclude);\n case ModuleType.Directory:\n return await new DirectoryClient().getFormCategories(page, includeEmpty, categories, exclude);\n case ModuleType.Database:\n return await new DatabaseClient().getCategories(page, includeEmpty, categories, exclude);\n case ModuleType.Gallery:\n return new GalleryClient().getCategories(page, includeEmpty, categories, exclude);\n case ModuleType.Problem:\n return new ProblemClient().getCategories(page, includeEmpty, categories, exclude);\n case ModuleType.Shop:\n return new ShopClient().getCategories(page, includeEmpty, categories, exclude);\n case ModuleType.Booking:\n return new BookingClient().getCategories(page, includeEmpty, categories, exclude);\n default: {\n return [];\n }\n }\n}\n"],"mappings":"6IAcaA,EAAgBC,MAAOC,EAAkBC,EAAcC,EAAsBC,EAAuBC,KAE/G,GAAIJ,IAAWK,EAASC,IAAK,CAE3B,MAAMC,EAAoB,IAAIC,EAC9B,aAAaD,EAAOT,cAAcG,EAAME,EAAcD,EAAYE,E,MAE7D,GAAIJ,IAAWK,EAASI,SAAU,CAEvC,MAAMF,EAAyB,IAAIG,EACnC,aAAaH,EAAOT,cAAcG,EAAME,EAAcD,EAAYE,E,MAE7D,GAAIJ,IAAWK,EAASM,KAAM,CAEnC,MAAMJ,EAAqB,IAAIK,EAC/B,aAAaL,EAAOT,cAAcG,EAAME,EAAcD,EAAYE,E,SAMzDS,EAA4Bd,MAAOe,EAAkBb,EAAcC,EAAsBE,EAAmBD,EAAwB,SAC/I,OAAQW,GACN,KAAKC,EAAWC,KACd,aAAa,IAAIJ,GAAad,cAAcG,EAAME,EAAcD,EAAYE,GAC9E,KAAKW,EAAWE,IACd,aAAa,IAAIT,GAAYV,cAAcG,EAAME,EAAcD,EAAYE,GAC7E,KAAKW,EAAWG,SACd,aAAa,IAAIR,GAAiBZ,cAAcG,EAAME,EAAcD,EAAYE,GAClF,KAAKW,EAAWI,UACd,aAAa,IAAIC,GAAkBC,kBAAkBpB,EAAME,EAAcD,EAAYE,GACvF,KAAKW,EAAWO,SACd,aAAa,IAAIC,GAAiBzB,cAAcG,EAAME,EAAcD,EAAYE,GAClF,KAAKW,EAAWS,QACd,OAAO,IAAIC,GAAgB3B,cAAcG,EAAME,EAAcD,EAAYE,GAC3E,KAAKW,EAAWW,QACd,OAAO,IAAIC,GAAgB7B,cAAcG,EAAME,EAAcD,EAAYE,GAC3E,KAAKW,EAAWa,KACd,OAAO,IAAIC,GAAa/B,cAAcG,EAAME,EAAcD,EAAYE,GACxE,KAAKW,EAAWe,QACd,OAAO,IAAIC,GAAgBjC,cAAcG,EAAME,EAAcD,EAAYE,GAC3E,QAAS,CACP,MAAO,E"}