// Svelte
import { writable } from 'svelte/store'

// Define environment
export const dev = process.env.NODE_ENV === 'development'


/* ==========================================================================
   Site related
========================================================================== */
const apiEndpoint = dev ? 'http://api.housesof.localhost/how' : 'https://api.housesof.world/_'
export const apiEndpoints = {
    gql: apiEndpoint + '/gql?access_token=NJk0urljsdSvApUDzWxGgoO6',
    rest: apiEndpoint
}

// Data
export let site = writable()
export let continents = writable()
export let countries = writable()
export let locations = writable()

// Derived data
export let currentLocation = writable()
export let currentPhotos = writable()

// State
export let loaded = writable(false)
