{"version":3,"file":"C0wCwxGt.js","sources":["../../../../src/middleware/redirect-vendelo.ts"],"sourcesContent":["import type {User} from \"~/models/services/User\";\n\nexport default defineNuxtRouteMiddleware((to) => {\n const user = useState('user');\n if (user.value) {\n if (user.value.role?.includes('premium')) {\n return navigateTo({\n path: '/members/cars/create',\n query: to.query\n })\n } else {\n return navigateTo({\n path: '/subscribed/cars/create',\n query: to.query\n })\n }\n }\n\n})"],"names":["redirectVendelo","defineNuxtRouteMiddleware","to","user","useState","_a","navigateTo"],"mappings":"iDAEA,MAAAA,EAAeC,EAA2BC,GAAO,OACvC,MAAAC,EAAOC,EAAsB,MAAM,EACzC,GAAID,EAAK,MACL,OAAIE,EAAAF,EAAK,MAAM,OAAX,MAAAE,EAAiB,SAAS,WACnBC,EAAW,CACd,KAAM,uBACN,MAAOJ,EAAG,KAAA,CACb,EAEMI,EAAW,CACd,KAAM,0BACN,MAAOJ,EAAG,KAAA,CACb,CAIb,CAAC"}