// rocie - An enterprise grocery management system - Web app // // Copyright (C) 2026 Benedikt Peetz // SPDX-License-Identifier: GPL-3.0-or-later // // This file is part of Rocie. // // You should have received a copy of the License along with this program. // If not, see . use syn::{Expr, Ident, LitStr, Type}; mod generate; mod parse; pub use generate::form_impl; pub struct ParsedOnSubmit { inputs: Vec, block: Expr, pub(crate) should_use_move: bool, } pub enum ParsedChild { Input { name: Ident, rust_type: Type, html_type: LitStr, label: LitStr, reactive: Option, auto_complete: Option, }, Checkbox { name: Ident, label: LitStr, }, Select { name: Ident, label: LitStr, rust_type: Type, options: Expr, // Vec<(String, Uuid)> }, Show { when: Expr, children: Vec, }, Textarea { name: Ident, label: LitStr, }, } pub struct ParsedInput { on_submit: ParsedOnSubmit, children: Vec, }