{"size": 786, "ext": "js", "max_stars_repo_path": "src/store/auth/presets.js", "max_stars_repo_name": "cybersturmer/pmdragon-clien", "max_stars_repo_stars_event_min_datetime": "2021-01-03T21:09:21.000Z", "max_stars_repo_stars_event_max_datetime": "2022-01-30T20:57:24.000Z", "max_issues_repo_path": "src/store/auth/presets.js", "max_issues_repo_name": "cybersturmer/pmdragon-clien", "max_issues_repo_issues_event_min_datetime": "2021-06-13T07:42:54.000Z", "max_issues_repo_issues_event_max_datetime": "2021-10-08T20:14:36.000Z", "max_forks_repo_path": "src/store/auth/presets.js", "max_forks_repo_name": "cybersturmer/pmdragon-clien", "max_forks_repo_forks_event_min_datetime": "2021-01-09T01:14:35.000Z", "max_forks_repo_forks_event_max_datetime": "2021-01-09T01:14:35.000Z"}
{"max_stars_count": 2, "max_issues_count": 3, "max_forks_count": 1, "avg_line_length": 21.8333333333, "max_line_length": 81, "alphanum_fraction": 0.6513994911}
import { LocalStorage } from 'quasar'

export const empty = () => {
	return {
		enabled: false,
		person_id: null,
		workspaces: [],
		persons: [],
		invited: [],
		tokens: {
			access: {
				data: null,
				expired_at: null
			},
			refresh: {
				data: null,
				expired_at: null
			}
		}
	}
}

export const restored = () => {
	return {
		enabled: LocalStorage.getItem('auth.enabled') || false,
		person_id: LocalStorage.getItem('auth.person_id'),
		workspaces: LocalStorage.getItem('auth.workspaces'),
		persons: LocalStorage.getItem('auth.persons'),
		invited: LocalStorage.getItem('auth.invited'),
		tokens: {
			access: LocalStorage.getItem('auth.tokens.access') || empty().tokens.access,
			refresh: LocalStorage.getItem('auth.tokens.refresh') || empty().tokens.refresh
		}
	}
}
