module Config.Data.Language exposing
    ( Language(..)
    , MultilingualTextElement
    )

{-| Types for facilitating multilingual functionality.
-}

import Element exposing (Element)


{-| A list of all currently supported languages. DeepL <https://www.deepl.com/translator> seems to
have the best translations, so we're just using those. Arabic will need some custom work though
since it runs right to left. It will be nice to expand this list over time as DeepL adds support
for more languages. Eventually it could be nice to host some local AI to do translation so we can
reduce lines of code by writing all text only once in English then automatically generating
translations.
-}
type Language
    = -- Arabic
      Bulgarian
    | Chinese
    | Czech
    | Danish
    | Dutch
    | English
    | Estonian
    | Finnish
    | French
    | German
    | Greek
    | Hungarian
    | Indonesian
    | Italian
    | Japanese
    | Korean
    | Latvian
    | Lithuanian
    | Norwegian
    | Polish
    | Portuguese
    | Romanian
    | Russian
    | Slovak
    | Slovenian
    | Spanish
    | Swedish
    | Turkish
    | Ukranian



-- type alias MultilingualText =
--     { bulgarian : String
--     , chinese : String
--     , czech : String
--     , danish : String
--     , dutch : String
--     , english : String
--     , estonian : String
--     , finnish : String
--     , french : String
--     , german : String
--     , greek : String
--     , hungarian : String
--     , indonesian : String
--     , italian : String
--     , japanese : String
--     , korean : String
--     , latvian : String
--     , lithuanian : String
--     , norwegian : String
--     , polish : String
--     , portuguese : String
--     , romanian : String
--     , russian : String
--     , slovak : String
--     , slovenian : String
--     , spanish : String
--     , swedish : String
--     , turkish : String
--     , ukranian : String
--     }


{-| We need a type that returns a different element based on which language is selected.
-}
type alias MultilingualTextElement msg =
    { bulgarian : Element msg
    , chinese : Element msg
    , czech : Element msg
    , danish : Element msg
    , dutch : Element msg
    , english : Element msg
    , estonian : Element msg
    , finnish : Element msg
    , french : Element msg
    , german : Element msg
    , greek : Element msg
    , hungarian : Element msg
    , indonesian : Element msg
    , italian : Element msg
    , japanese : Element msg
    , korean : Element msg
    , latvian : Element msg
    , lithuanian : Element msg
    , norwegian : Element msg
    , polish : Element msg
    , portuguese : Element msg
    , romanian : Element msg
    , russian : Element msg
    , slovak : Element msg
    , slovenian : Element msg
    , spanish : Element msg
    , swedish : Element msg
    , turkish : Element msg
    , ukranian : Element msg
    }
