use leptos::*;
use crate::backend::data::MessageType;
use crate::locales::trl;
use crate::pages::mail_view::MailView;

#[component]
pub fn mail_settings() -> impl IntoView {
    view! {
        <h1>{trl("Mail settings")}</h1>
        <div class="row mb-5">
            <div class="col-md">
                <MailView title="New booking" mail_type=MessageType::NewReservation/>
            </div>
            <div class="col-md">
                <MailView title="New booking - for customer" mail_type=MessageType::NewReservationCust/>
            </div>
          </div>
        <div class="row mb-5">
            <div class="col-md">
                <MailView title="Booking approved" mail_type=MessageType::ReservationApp/>
            </div>
            <div class="col-md">
                <MailView title="Booking canceled" mail_type=MessageType::ReservationCanceled/>
            </div>
          </div>
    }
}