package constdata

// PASSWORD_VALIDATION_REGEX is used by the frontend (JavaScript supports lookaheads).
const PASSWORD_VALIDATION_REGEX = `^(?=.*[a-z])(?=.*[A-Z])(?=.*\d).{10,}$`
const SHOP_ID = 1
const SHOP_DEFAULT_LANGUAGE = 1

// CATEGORY_TREE_ROOT_ID corresponds to id_category in ps_category which has is_root_category=1
const CATEGORY_TREE_ROOT_ID = 2

const MAX_AMOUNT_OF_CARTS_PER_USER = 10
const DEFAULT_NEW_CART_NAME = "new cart"

const USER_LOCALE = "user"

// Slug sanitization
const NON_ALNUM_REGEX = `[^a-z0-9]+`
const MULTI_DASH_REGEX = `-+`
const SLUG_REGEX = `^[a-z0-9]+(?:-[a-z0-9]+)*$`

// Currently supports only German+Polish specific cases
var TRANSLITERATION_TABLE = map[rune]string{
	// German
	'ä': "ae",
	'ö': "oe",
	'ü': "ue",
	'ß': "ss",

	// Polish
	'ą': "a",
	'ć': "c",
	'ę': "e",
	'ł': "l",
	'ń': "n",
	'ó': "o",
	'ś': "s",
	'ż': "z",
	'ź': "z",
}
