// supported languages are on https://learn.microsoft.com/en-us/windows/apps/publish/publish-your-app/supported-languages?pivots=store-installer-msix
const ms_supported_codes =
  'ar, ar-sa, ar-ae, ar-bh, ar-dz, ar-eg, ar-iq, ar-jo, ar-kw, ar-lb, ar-ly, ar-ma, ar-om, ar-qa, ar-sy, ar-tn, ar-ye, af, af-za, sq, sq-al, am, am-et, hy, hy-am, as, as-in, az-arab, az-arab-az, az-cyrl, az-cyrl-az, az-latn, az-latn-az, eu, eu-es, be, be-by, bn, bn-bd, bn-in, bs, bs-cyrl, bs-cyrl-ba, bs-latn, bs-latn-ba, bg, bg-bg, ca, ca-es, ca-es-valencia, chr-cher, chr-cher-us, chr-latn, zh-Hans, zh-cn, zh-hans-cn, zh-sg, zh-hans-sg, zh-Hant, zh-hk, zh-mo, zh-tw, zh-hant-hk, zh-hant-mo, zh-hant-tw, hr, hr-hr, hr-ba, cs, cs-cz, da, da-dk, prs, prs-af, prs-arab, nl, nl-nl, nl-be, en, en-au, en-ca, en-gb, en-ie, en-in, en-nz, en-sg, en-us, en-za, en-bz, en-hk, en-id, en-jm, en-kz, en-mt, en-my, en-ph, en-pk, en-tt, en-vn, en-zw, en-053, en-021, en-029, en-011, en-018, en-014, et, et-ee, fil, fil-latn, fil-ph, fi, fi-fi, fr, fr-be , fr-ca , fr-ch , fr-fr , fr-lu, fr-015, fr-cd, fr-ci, fr-cm, fr-ht, fr-ma, fr-mc, fr-ml, fr-re, frc-latn, frp-latn, fr-155, fr-029, fr-021, fr-011, gl, gl-es, ka, ka-ge, de, de-at, de-ch, de-de, de-lu, de-li, el, el-gr, gu, gu-in, ha, ha-latn, ha-latn-ng, he, he-il, hi, hi-in, hu, hu-hu, is, is-is, ig-latn, ig-ng, id, id-id, iu-cans, iu-latn, iu-latn-ca, ga, ga-ie, xh, xh-za, zu, zu-za, it, it-it, it-ch, ja , ja-jp, kn, kn-in, kk, kk-kz, uc-latn, qut-gt, qut-latn, rw, rw-rw, sw, sw-ke, kok, kok-in, ko, ko-kr, ku-arab, ku-arab-iq, ky-kg, ky-cyrl, lo, lo-la, lv, lv-lv, lt, lt-lt, lb, lb-lu, mk, mk-mk, ms, ms-bn, ms-my, ml, ml-in, mt, mt-mt, mi, mi-latn, mi-nz, mr, mr-in, mn-cyrl, mn-mong, mn-mn, mn-phag, ne, ne-np, nb, nb-no, nn, nn-no, no, no-no,, or, or-in, fa, fa-ir, pl, pl-pl, pt-br, pt, pt-pt,pa, pa-arab, pa-arab-pk, pa-deva, pa-in,quz, quz-bo, quz-ec, quz-pe,ro, ro-ro, ru, ru-ru,gd-gb, gd-latn,sr-Latn, sr-latn-cs, sr, sr-latn-ba, sr-latn-me, sr-latn-rs, sr-cyrl, sr-cyrl-ba, sr-cyrl-cs, sr-cyrl-me, sr-cyrl-rs, sa nso, nso-za, tn, tn-bw, tn-za, sd-arab, sd-arab-pk, sd-deva, si, si-lk, sk, sk-sk, sl, sl-si, es, es-cl, es-co, es-es, es-mx, es-ar, es-bo, es-cr, es-do, es-ec, es-gt, es-hn, es-ni, es-pa, es-pe, es-pr, es-py, es-sv, es-us, es-uy, es-ve, es-019, es-419, sv, sv-se, sv-fi, tg-arab, tg-cyrl, tg-cyrl-tj, tg-latn,	ta, ta-in,	tt-arab, tt-cyrl, tt-latn, tt-ru, te, te-in, th, th-th,	ti, ti-et,	tr, tr-tr,	tk-cyrl, tk-latn, tk-tm, tk-latn-tr, tk-cyrl-tr, uk, uk-ua,	ur, ur-pk, ug-arab, ug-cn, ug-cyrl, ug-latn, uz, uz-cyrl, uz-latn, uz-latn-uz, vi, vi-vn, cy, cy-gb, wo, wo-sn, yo-latn, yo-ng'
    .split(',')
    .map(s => s.trim())

export function isAppxSupportedLanguage(query) {
  return ms_supported_codes.indexOf(query) !== -1
}
