{"version":3,"file":"onboardingCheckUtils.cdd79f51.js","sources":["../../../../../../src/lib/utils/onboardingCheckUtils.ts"],"sourcesContent":["import { OnboardingStatus } from '@aymeric_henry_sr/svelte-proto/profile_pb';\nimport { getProfileSettings } from '../../grpc/profile/getProfileSettings';\nimport { setProfileSetting } from '../../grpc/profile/setProfileSetting';\n\nexport async function shouldRedirectToOnboarding() {\n\ttry {\n\t\tconst res = await getProfileSettings();\n\t\tconst result =\n\t\t\tres.message.getHasfinishedonboarding() === OnboardingStatus.ONBOARDING_STATUS_NOT_STARTED;\n\t\treturn result;\n\t} catch (e) {\n\t\tconsole.error('Error getting profile settings', e);\n\t\treturn false;\n\t}\n}\n\nexport async function setHasFinishedOnboarding(hasFinishedOnboarding: boolean) {\n\ttry {\n\t\tawait setProfileSetting(\n\t\t\t'hasFinishedOnboarding',\n\t\t\thasFinishedOnboarding\n\t\t\t\t? OnboardingStatus.ONBOARDING_STATUS_COMPLETED\n\t\t\t\t: OnboardingStatus.ONBOARDING_STATUS_NOT_STARTED\n\t\t);\n\t} catch (e) {\n\t\tconsole.error('Error setting profile settings', e);\n\t}\n}\n"],"names":["shouldRedirectToOnboarding","getProfileSettings","OnboardingStatus","setHasFinishedOnboarding","hasFinishedOnboarding","setProfileSetting","e"],"mappings":"4eAIA,eAAsBA,GAA6B,CAC9C,GAAA,CAII,OAHK,MAAMC,KAEb,QAAQ,6BAA+BC,EAAiB,iBAAA,oCAErD,EAAG,CACH,eAAA,MAAM,iCAAkC,CAAC,EAC1C,EACR,CACD,CAEA,eAAsBC,EAAyBC,EAAgC,CAC1E,GAAA,CACG,MAAAC,EACL,wBACAD,EACGF,EAAiB,iBAAA,4BACjBA,EAAAA,iBAAiB,6BAAA,QAEbI,EAAG,CACH,QAAA,MAAM,iCAAkCA,CAAC,CAClD,CACD"}