module LoggedIn.Home.AddPayment.Model
  ( Model
  , init
  ) where

import Result as Result exposing (Result(..))
import Json.Decode exposing ((:=))

import Model.Translations exposing (..)
import Model.Payment exposing (Frequency(..))

type alias Model =
  { name : String
  , nameError : Maybe String
  , cost : String
  , costError : Maybe String
  , frequency : Frequency
  , waitingServer : Bool
  }

init : Frequency -> Model
init frequency =
  { name = ""
  , nameError = Nothing
  , cost = ""
  , costError = Nothing
  , frequency = frequency
  , waitingServer = False
  }