pub mod get_new;
pub mod post_new;
pub mod get_edit;
pub mod post_edit;
pub mod delete;

use rinja::Template;
use serde::Deserialize;

use crate::models::{Area, Role, User};

#[derive(Template)]
#[cfg_attr(not(test), template(path = "area/new_or_edit.html"))]
#[cfg_attr(test, template(path = "area/new_or_edit.html", block = "content"))]
struct NewOrEditAreaTemplate {
    user: User,
    area: Option<Area>,
}

#[derive(Deserialize)]
struct AreaForm {
    name: String,
}
