package Demo/Service/NotesApp

# FrontendSpec over the owner-scoped notes API. Views select and title
# existing ServiceDef routes; field schemas come from handler types in
# the IR. Compile together with notes-api.bosatsu.

from Bosatsu/Predef import List
from Yichus/Frontend import View, FrontendSpec, ListView, Form, Action

export (notes_app)
exposes Yichus/Frontend

notes_app = FrontendSpec(
  "Notes",
  [
    View("/notes", "Your notes", ListView),
    View("/notes/add", "Add a note", Form),
    View("/notes/put", "Replace notes", Form),
    View("/notes/clear", "Clear notes", Action),
  ]
)
