module Interviews.Types exposing (..)


type alias Interview =
    { interviewName : String
    , interviewImage : String
    , interviewSocial : String
    , interviewAppearances : List Appearance
    }


type alias Appearance =
    { appearanceEpisode : String
    , appearanceLink : String
    , appearanceTitle : String
    , appearanceYear : String
    , appearanceExperience : Int
    , appearanceSubjects : List Subjects
    }


type alias Subjects =
    { subject : String }


type alias FormattedInterviewName =
    String


type alias FormattedInterviewSocial =
    String


formatInterviewName : String -> FormattedInterviewName
formatInterviewName name =
    name
        |> String.toLower
        |> String.replace " " ""
        |> String.replace "'" ""
        |> String.replace "." ""
        |> String.replace "-" ""


formatInterviewSocial : String -> FormattedInterviewSocial
formatInterviewSocial name =
    name
        |> String.replace "https://x.com/" "@"
        |> String.replace "https://www.threads.net/@" "@"
