const useAuthSocialStore = Pinia.defineStore({
	id: 'authSocial',
	state: () => ({}),
	actions: {
		async loginFacebook(payload) {
			let response
			try {
				response = await axios.post('/vendor/login_facebook', payload)
			} catch (e) {
				console.error(e)
				response = {success: false, e}
			}

			return response
		},
		async loginGoogle(payload) {
			let response
			try {
				response = await axios.post('/vendor/login_google', payload)
			} catch (e) {
				console.error(e)
				response = {success: false, e}
			}

			return response
		},
		async loginApple(payload) {
			let response
			try {
				response = await axios.post('/vendor/login_apple', payload)
			} catch (e) {
				console.error(e)
				response = {success: false, e}
			}

			return response
		},
	},
})
window.useAuthSocialStore = useAuthSocialStore;
