//
// User preferences
//

export const defaultBorderSettings = Object.freeze({
	borderType: 'momentary',
	borderColour: '#ff2f92',
	borderFontSize: '16'
})

export const defaultDebugSettings = Object.freeze({
	debugInfo: false
})

export const defaultInterfaceSettings = Object.freeze({
	interface: 'popup'
})

let _defaultSettings

switch (BROWSER) {
	case 'firefox':
	case 'opera':
		_defaultSettings = Object.freeze(Object.assign({},
			defaultBorderSettings,
			defaultDebugSettings,
			defaultInterfaceSettings))
		break
	case 'chrome':
	case 'edge':
		_defaultSettings = Object.freeze(Object.assign({},
			defaultBorderSettings,
			defaultDebugSettings))
		break
	default:
		throw Error(`Landmarks: invalid browser ${BROWSER} given.`)
}

export const defaultSettings = _defaultSettings


//
// Dismissal state of user interface messages
//

let _dismissalStates

if (BROWSER === 'firefox' || BROWSER === 'opera') {
	_dismissalStates = Object.freeze({
		dismissedSidebarNotAlone: false
	})
}

export const dismissalStates = _dismissalStates

//
// User preferences
//

export const defaultBorderSettings = Object.freeze({
	borderType: 'momentary',
	borderColour: '#ff2f92',
	borderFontSize: '16'
})

export const defaultDebugSettings = Object.freeze({
	debugInfo: false
})

export const defaultInterfaceSettings =
	(BROWSER === 'firefox' || BROWSER === 'opera')
		? Object.freeze({ interface: 'popup' })
		: null

export const defaultSettings =
	(BROWSER === 'firefox' || BROWSER === 'opera')
		? Object.freeze(Object.assign({},
			defaultBorderSettings,
			defaultDebugSettings,
			defaultInterfaceSettings))
		: Object.freeze(Object.assign({},
			defaultBorderSettings,
			defaultDebugSettings))


//
// Dismissal state of user interface messages
//

export const dismissalStates =
	(BROWSER === 'firefox' || BROWSER === 'opera')
		? Object.freeze({ dismissedSidebarNotAlone: false })
		: null

Clean up defaults definitions