/// # leptos
open rust.rust_operators
open rust
open sm'_operators

/// ### a'
nominal a' =
    `(
        global "#if FABLE_COMPILER\n[<Fable.Core.Erase; Fable.Core.Emit(\"leptos::html::A\")>]\n#endif\ntype leptos_html_A = class end"
        $'' : $'leptos_html_A'
    )

/// ### event
nominal event =
    `(
        global "#if FABLE_COMPILER\n[<Fable.Core.Erase; Fable.Core.Emit(\"leptos::ev::Event\")>]\n#endif\ntype leptos_ev_Event = class end"
        $'' : $'leptos_ev_Event'
    )

/// ### mouse_event
nominal mouse_event =
    `(
        global "#if FABLE_COMPILER\n[<Fable.Core.Erase; Fable.Core.Emit(\"leptos::ev::MouseEvent\")>]\n#endif\ntype leptos_ev_MouseEvent = class end"
        $'' : $'leptos_ev_MouseEvent'
    )

/// ### button
nominal button =
    `(
        global "#if FABLE_COMPILER\n[<Fable.Core.Erase; Fable.Core.Emit(\"leptos::html::Button\")>]\n#endif\ntype leptos_html_Button = class end"
        $'' : $'leptos_html_Button'
    )

/// ### details
nominal details =
    `(
        global "#if FABLE_COMPILER\n[<Fable.Core.Erase; Fable.Core.Emit(\"leptos::html::Details\")>]\n#endif\ntype leptos_html_Details = class end"
        $'' : $'leptos_html_Details'
    )

/// ### dd
nominal dd =
    `(
        global "#if FABLE_COMPILER\n[<Fable.Core.Erase; Fable.Core.Emit(\"leptos::html::Dd\")>]\n#endif\ntype leptos_html_Dd = class end"
        $'' : $'leptos_html_Dd'
    )

/// ### div
nominal div =
    `(
        global "#if FABLE_COMPILER\n[<Fable.Core.Erase; Fable.Core.Emit(\"leptos::html::Div\")>]\n#endif\ntype leptos_html_Div = class end"
        $'' : $'leptos_html_Div'
    )

/// ### dl
nominal dl =
    `(
        global "#if FABLE_COMPILER\n[<Fable.Core.Erase; Fable.Core.Emit(\"leptos::html::Dl\")>]\n#endif\ntype leptos_html_Dl = class end"
        $'' : $'leptos_html_Dl'
    )

/// ### dt
nominal dt =
    `(
        global "#if FABLE_COMPILER\n[<Fable.Core.Erase; Fable.Core.Emit(\"leptos::html::Dt\")>]\n#endif\ntype leptos_html_Dt = class end"
        $'' : $'leptos_html_Dt'
    )

/// ### footer
nominal footer =
    `(
        global "#if FABLE_COMPILER\n[<Fable.Core.Erase; Fable.Core.Emit(\"leptos::html::Footer\")>]\n#endif\ntype leptos_html_Footer = class end"
        $'' : $'leptos_html_Footer'
    )

/// ### header
nominal header =
    `(
        global "#if FABLE_COMPILER\n[<Fable.Core.Erase; Fable.Core.Emit(\"leptos::html::Header\")>]\n#endif\ntype leptos_html_Header = class end"
        $'' : $'leptos_html_Header'
    )

/// ### input
nominal input =
    `(
        global "#if FABLE_COMPILER\n[<Fable.Core.Erase; Fable.Core.Emit(\"leptos::html::Input\")>]\n#endif\ntype leptos_html_Input = class end"
        $'' : $'leptos_html_Input'
    )

/// ### label
nominal label =
    `(
        global "#if FABLE_COMPILER\n[<Fable.Core.Erase; Fable.Core.Emit(\"leptos::html::Label\")>]\n#endif\ntype leptos_html_Label = class end"
        $'' : $'leptos_html_Label'
    )

/// ### main
nominal main =
    `(
        global "#if FABLE_COMPILER\n[<Fable.Core.Erase; Fable.Core.Emit(\"leptos::html::Main\")>]\n#endif\ntype leptos_html_Main = class end"
        $'' : $'leptos_html_Main'
    )

/// ### nav
nominal nav =
    `(
        global "#if FABLE_COMPILER\n[<Fable.Core.Erase; Fable.Core.Emit(\"leptos::html::Nav\")>]\n#endif\ntype leptos_html_Nav = class end"
        $'' : $'leptos_html_Nav'
    )

/// ### option'
nominal option' =
    `(
        global "#if FABLE_COMPILER\n[<Fable.Core.Erase; Fable.Core.Emit(\"leptos::html::Option_\")>]\n#endif\ntype leptos_html_Option = class end"
        $'' : $'leptos_html_Option'
    )

/// ### pre
nominal pre =
    `(
        global "#if FABLE_COMPILER\n[<Fable.Core.Erase; Fable.Core.Emit(\"leptos::html::Pre\")>]\n#endif\ntype leptos_html_Pre = class end"
        $'' : $'leptos_html_Pre'
    )

/// ### select
nominal select =
    `(
        global "#if FABLE_COMPILER\n[<Fable.Core.Erase; Fable.Core.Emit(\"leptos::html::Select\")>]\n#endif\ntype leptos_html_Select = class end"
        $'' : $'leptos_html_Select'
    )

/// ### span
nominal span =
    `(
        global "#if FABLE_COMPILER\n[<Fable.Core.Erase; Fable.Core.Emit(\"leptos::html::Span\")>]\n#endif\ntype leptos_html_Span = class end"
        $'' : $'leptos_html_Span'
    )

/// ### summary
nominal summary =
    `(
        global "#if FABLE_COMPILER\n[<Fable.Core.Erase; Fable.Core.Emit(\"leptos::html::Summary\")>]\n#endif\ntype leptos_html_Summary = class end"
        $'' : $'leptos_html_Summary'
    )

/// ### table
nominal table =
    `(
        global "#if FABLE_COMPILER\n[<Fable.Core.Erase; Fable.Core.Emit(\"leptos::html::Table\")>]\n#endif\ntype leptos_html_Table = class end"
        $'' : $'leptos_html_Table'
    )

/// ### thead
nominal thead =
    `(
        global "#if FABLE_COMPILER\n[<Fable.Core.Erase; Fable.Core.Emit(\"leptos::html::Thead\")>]\n#endif\ntype leptos_html_Thead = class end"
        $'' : $'leptos_html_Thead'
    )

/// ### tbody
nominal tbody =
    `(
        global "#if FABLE_COMPILER\n[<Fable.Core.Erase; Fable.Core.Emit(\"leptos::html::Tbody\")>]\n#endif\ntype leptos_html_Tbody = class end"
        $'' : $'leptos_html_Tbody'
    )

/// ### tr
nominal tr =
    `(
        global "#if FABLE_COMPILER\n[<Fable.Core.Erase; Fable.Core.Emit(\"leptos::html::Tr\")>]\n#endif\ntype leptos_html_Tr = class end"
        $'' : $'leptos_html_Tr'
    )

/// ### th
nominal th =
    `(
        global "#if FABLE_COMPILER\n[<Fable.Core.Erase; Fable.Core.Emit(\"leptos::html::Th\")>]\n#endif\ntype leptos_html_Th = class end"
        $'' : $'leptos_html_Th'
    )

/// ### td
nominal td =
    `(
        global "#if FABLE_COMPILER\n[<Fable.Core.Erase; Fable.Core.Emit(\"leptos::html::Td\")>]\n#endif\ntype leptos_html_Td = class end"
        $'' : $'leptos_html_Td'
    )

/// ### svg
nominal svg =
    `(
        global "#if FABLE_COMPILER\n[<Fable.Core.Erase; Fable.Core.Emit(\"leptos::svg::Svg\")>]\n#endif\ntype leptos_svg_Svg = class end"
        $'' : $'leptos_svg_Svg'
    )

/// ### path
nominal path =
    `(
        global "#if FABLE_COMPILER\n[<Fable.Core.Erase; Fable.Core.Emit(\"leptos::svg::Path\")>]\n#endif\ntype leptos_svg_Path = class end"
        $'' : $'leptos_svg_Path'
    )

/// ### circle
nominal circle =
    `(
        global "#if FABLE_COMPILER\n[<Fable.Core.Erase; Fable.Core.Emit(\"leptos::svg::Circle\")>]\n#endif\ntype leptos_svg_Circle = class end"
        $'' : $'leptos_svg_Circle'
    )

/// ### rect
nominal rect =
    `(
        global "#if FABLE_COMPILER\n[<Fable.Core.Erase; Fable.Core.Emit(\"leptos::svg::Rect\")>]\n#endif\ntype leptos_svg_Rect = class end"
        $'' : $'leptos_svg_Rect'
    )

/// ### animate
nominal animate =
    `(
        global "#if FABLE_COMPILER\n[<Fable.Core.Erase; Fable.Core.Emit(\"leptos::svg::Animate\")>]\n#endif\ntype leptos_svg_Animate = class end"
        $'' : $'leptos_svg_Animate'
    )

/// ### action
nominal action t u =
    `(
        global "#if FABLE_COMPILER\n[<Fable.Core.Erase; Fable.Core.Emit(\"leptos::prelude::Action<$0, $1>\")>]\n#endif\ntype leptos_prelude_Action<'T, 'U> = class end"
        $'' : $'leptos_prelude_Action<`t, `u>'
    )

/// ### arc_action
nominal arc_action t u =
    `(
        global "#if FABLE_COMPILER\n[<Fable.Core.Erase; Fable.Core.Emit(\"leptos::prelude::ArcAction<$0, $1>\")>]\n#endif\ntype leptos_prelude_ArcAction<'T, 'U> = class end"
        $'' : $'leptos_prelude_ArcAction<`t, `u>'
    )

/// ### for
nominal for =
    `(
        global "#if FABLE_COMPILER\n[<Fable.Core.Erase; Fable.Core.Emit(\"leptos::prelude::For\")>]\n#endif\ntype leptos_prelude_For = class end"
        $'' : $'leptos_prelude_For'
    )

/// ### show
nominal show =
    `(
        global "#if FABLE_COMPILER\n[<Fable.Core.Erase; Fable.Core.Emit(\"leptos::prelude::Show\")>]\n#endif\ntype leptos_prelude_Show = class end"
        $'' : $'leptos_prelude_Show'
    )

/// ### fragment
nominal fragment =
    `(
        global "#if FABLE_COMPILER\n[<Fable.Core.Erase; Fable.Core.Emit(\"leptos::prelude::Fragment\")>]\n#endif\ntype leptos_dom_Fragment = class end"
        $'' : $'leptos_dom_Fragment'
    )

/// ### interval_handle
nominal interval_handle =
    `(
        global "#if FABLE_COMPILER\n[<Fable.Core.Erase; Fable.Core.Emit(\"leptos::leptos_dom::helpers::IntervalHandle\")>]\n#endif\ntype leptos_dom_IntervalHandle = class end"
        $'' : $'leptos_dom_IntervalHandle'
    )

/// ### text
nominal text =
    `(
        global "#if FABLE_COMPILER\n[<Fable.Core.Erase; Fable.Core.Emit(\"leptos::tachys::renderer::dom::Text\")>]\n#endif\ntype leptos_dom_Text = class end"
        $'' : $'leptos_dom_Text'
    )

/// ### transparent
nominal transparent =
    `(
        global "#if FABLE_COMPILER\n[<Fable.Core.Erase; Fable.Core.Emit(\"leptos::leptos_dom::Transparent\")>]\n#endif\ntype leptos_dom_Transparent = class end"
        $'' : $'leptos_dom_Transparent'
    )

/// ### route
nominal route =
    `(
        global "#if FABLE_COMPILER\n[<Fable.Core.Erase; Fable.Core.Emit(\"leptos_router::Route\")>]\n#endif\ntype leptos_router_Route = class end"
        $'' : $'leptos_router_Route'
    )

/// ### nested_route
nominal nested_route =
    `(
        global "#if FABLE_COMPILER\n[<Fable.Core.Erase; Fable.Core.Emit(\"leptos_router::NestedRoute<_, _, _, _>\")>]\n#endif\ntype leptos_router_NestedRoute = class end"
        $'' : $'leptos_router_NestedRoute'
    )

/// ### route_definition
nominal route_definition =
    `(
        global "#if FABLE_COMPILER\n[<Fable.Core.Erase; Fable.Core.Emit(\"leptos_router::RouteDefinition\")>]\n#endif\ntype leptos_router_RouteDefinition = class end"
        $'' : $'leptos_router_RouteDefinition'
    )

/// ### router
nominal router =
    `(
        global "#if FABLE_COMPILER\n[<Fable.Core.Erase; Fable.Core.Emit(\"leptos_router::Router\")>]\n#endif\ntype leptos_router_Router = class end"
        $'' : $'leptos_router_Router'
    )

/// ### routes
nominal routes =
    `(
        global "#if FABLE_COMPILER\n[<Fable.Core.Erase; Fable.Core.Emit(\"leptos_router::Routes\")>]\n#endif\ntype leptos_router_Routes = class end"
        $'' : $'leptos_router_Routes'
    )

/// ### html_element
nominal html_element t =
    `(
        global "#if FABLE_COMPILER\n[<Fable.Core.Erase; Fable.Core.Emit(\"leptos::html::HtmlElement<$0, _, _>\")>]\n#endif\ntype leptos_dom_html_HtmlElement<'T> = class end"
        $'' : $'leptos_dom_html_HtmlElement<`t>'
    )

/// ### into_view
nominal into_view =
    `(
        global "#if FABLE_COMPILER\n[<Fable.Core.Erase; Fable.Core.Emit(\"leptos::IntoView\")>]\n#endif\ntype leptos_IntoView = class end"
        $'' : $'leptos_IntoView'
    )

/// ### location
nominal location =
    `(
        global "#if FABLE_COMPILER\n[<Fable.Core.Erase; Fable.Core.Emit(\"leptos_router::location::Location\")>]\n#endif\ntype leptos_router_location_Location = class end"
        $'' : $'leptos_router_location_Location'
    )

/// ### navigate_options
nominal navigate_options =
    `(
        global "#if FABLE_COMPILER\n[<Fable.Core.Erase; Fable.Core.Emit(\"leptos_router::NavigateOptions\")>]\n#endif\ntype leptos_router_NavigateOptions = class end"
        $'' : $'leptos_router_NavigateOptions'
    )

/// ### url
nominal url =
    `(
        global "#if FABLE_COMPILER\n[<Fable.Core.Erase; Fable.Core.Emit(\"leptos_router::location::Url\")>]\n#endif\ntype leptos_router_Url = class end"
        $'' : $'leptos_router_Url'
    )

/// ### memo
nominal memo t =
    `(
        global "#if FABLE_COMPILER\n[<Fable.Core.Erase; Fable.Core.Emit(\"leptos::prelude::Memo<$0>\")>]\n#endif\ntype leptos_prelude_Memo<'T> = class end"
        $'' : $'leptos_prelude_Memo<`t>'
    )

/// ### arc_memo
nominal arc_memo t =
    `(
        global "#if FABLE_COMPILER\n[<Fable.Core.Erase; Fable.Core.Emit(\"leptos::prelude::ArcMemo<$0>\")>]\n#endif\ntype leptos_prelude_ArcMemo<'T> = class end"
        $'' : $'leptos_prelude_ArcMemo<`t>'
    )

/// ### rw_signal
nominal rw_signal t =
    `(
        global "#if FABLE_COMPILER\n[<Fable.Core.Erase; Fable.Core.Emit(\"leptos::prelude::RwSignal<$0>\")>]\n#endif\ntype leptos_prelude_RwSignal<'T> = class end"
        $'' : $'leptos_prelude_RwSignal<`t>'
    )

/// ### arc_rw_signal
nominal arc_rw_signal t =
    `(
        global "#if FABLE_COMPILER\n[<Fable.Core.Erase; Fable.Core.Emit(\"leptos::prelude::ArcRwSignal<$0>\")>]\n#endif\ntype leptos_prelude_ArcRwSignal<'T> = class end"
        $'' : $'leptos_prelude_ArcRwSignal<`t>'
    )

/// ### signal
nominal signal t =
    `(
        global "#if FABLE_COMPILER\n[<Fable.Core.Erase; Fable.Core.Emit(\"leptos::prelude::Signal<$0>\")>]\n#endif\ntype leptos_prelude_Signal<'T> = class end"
        $'' : $'leptos_prelude_Signal<`t>'
    )

/// ### arc_signal
nominal arc_signal t =
    `(
        global "#if FABLE_COMPILER\n[<Fable.Core.Erase; Fable.Core.Emit(\"leptos::prelude::ArcSignal<$0>\")>]\n#endif\ntype leptos_prelude_ArcSignal<'T> = class end"
        $'' : $'leptos_prelude_ArcSignal<`t>'
    )

/// ### read_signal
nominal read_signal t =
    `(
        global "#if FABLE_COMPILER\n[<Fable.Core.Erase; Fable.Core.Emit(\"leptos::prelude::ReadSignal<$0>\")>]\n#endif\ntype leptos_prelude_ReadSignal<'T> = class end"
        $'' : $'leptos_prelude_ReadSignal<`t>'
    )

/// ### arc_read_signal
nominal arc_read_signal t =
    `(
        global "#if FABLE_COMPILER\n[<Fable.Core.Erase; Fable.Core.Emit(\"leptos::prelude::ArcReadSignal<$0>\")>]\n#endif\ntype leptos_prelude_ArcReadSignal<'T> = class end"
        $'' : $'leptos_prelude_ArcReadSignal<`t>'
    )

/// ### write_signal
nominal write_signal t =
    `(
        global "#if FABLE_COMPILER\n[<Fable.Core.Erase; Fable.Core.Emit(\"leptos::prelude::WriteSignal<$0>\")>]\n#endif\ntype leptos_prelude_WriteSignal<'T> = class end"
        $'' : $'leptos_prelude_WriteSignal<`t>'
    )

/// ### arc_write_signal
nominal arc_write_signal t =
    `(
        global "#if FABLE_COMPILER\n[<Fable.Core.Erase; Fable.Core.Emit(\"leptos::prelude::ArcWriteSignal<$0>\")>]\n#endif\ntype leptos_prelude_ArcWriteSignal<'T> = class end"
        $'' : $'leptos_prelude_ArcWriteSignal<`t>'
    )

/// ### resource
nominal resource t u =
    `(
        global "#if FABLE_COMPILER\n[<Fable.Core.Erase; Fable.Core.Emit(\"leptos::prelude::Resource<$0, $1>\")>]\n#endif\ntype leptos_prelude_Resource<'T, 'U> = class end"
        $'' : $'leptos_prelude_Resource<`t, `u>'
    )

/// ### arc_resource
nominal arc_resource t u =
    `(
        global "#if FABLE_COMPILER\n[<Fable.Core.Erase; Fable.Core.Emit(\"leptos::prelude::ArcResource<$0, $1>\")>]\n#endif\ntype leptos_prelude_ArcResource<'T, 'U> = class end"
        $'' : $'leptos_prelude_ArcResource<`t, `u>'
    )

/// ### local_resource
nominal local_resource t u =
    `(
        global "#if FABLE_COMPILER\n[<Fable.Core.Erase; Fable.Core.Emit(\"leptos::prelude::LocalResource<$0, $1>\")>]\n#endif\ntype leptos_prelude_LocalResource<'T, 'U> = class end"
        $'' : $'leptos_prelude_LocalResource<`t, `u>'
    )

/// ### arc_local_resource
nominal arc_local_resource t =
    `(
        global "#if FABLE_COMPILER\n[<Fable.Core.Erase; Fable.Core.Emit(\"leptos::prelude::ArcLocalResource<$0>\")>]\n#endif\ntype leptos_prelude_ArcLocalResource<'T> = class end"
        $'' : $'leptos_prelude_ArcLocalResource<`t>'
    )

/// ### any_view
nominal any_view =
    `(
        global "#if FABLE_COMPILER\n[<Fable.Core.Erase; Fable.Core.Emit(\"leptos::prelude::AnyView\")>]\n#endif\ntype leptos_prelude_AnyView = class end"
        $'' : $'leptos_prelude_AnyView'
    )

/// ### view'
nominal view' t =
    `(
        global "#if FABLE_COMPILER\n[<Fable.Core.Erase; Fable.Core.Emit(\"leptos::prelude::View<$0>\")>]\n#endif\ntype leptos_prelude_View<'T> = class end"
        $'' : $'leptos_prelude_View<`t>'
    )

/// ### view
nominal view =
    `(
        global "#if FABLE_COMPILER\n[<Fable.Core.Erase; Fable.Core.Emit(\"leptos::prelude::AnyView\")>]\n#endif\ntype leptos_prelude_AnyView_ = class end"
        $'' : $'leptos_prelude_AnyView_'
    )

/// ### signal_get
prototype signal_get signal t : signal t -> t

/// ### signal_get_untracked
prototype signal_get_untracked signal t : signal t -> t

/// ### signal_update
prototype signal_update signal t : (t -> t) -> signal t -> ()

/// ### signal_set
prototype signal_set signal t : t -> signal t -> ()

/// ### log_string
inl log_string (text : string) =
    (!\($'@@"true; leptos::logging::log\!(""" + !text + @@""");"') : bool) |> ignore

/// ### log
inl log (text : string) =
    (!\\(text, $'@@$"true; leptos::logging::log\!(""{{}}"", $0)"') : bool) |> ignore

/// ### log_debug
inl log_debug (text : string) =
    (!\\(text, $'@@$"true; leptos::logging::log\!(""{{:?}}"", $0)"') : bool) |> ignore

/// ### log_pretty
inl log_pretty (text : string) =
    (!\\(text, $'@@$"true; leptos::logging::log\!(""{{:\#?}}"", $0)"') : bool) |> ignore

/// ### log_format
inl log_format fn obj =
    inl obj_log = obj |> sm'.format_debug
    inl text = fn obj_log |> sm'.ellipsis_end 200
    log text
    obj

/// ### mount_to_body
inl mount_to_body (view_fn : () -> rust.impl into_view) : () =
    (!\\(view_fn, $'"true; leptos::prelude::mount_to_body(|| $0()); //"') : bool) |> ignore

/// ### view_vec_to_fragment
inl view_vec_to_fragment (view : am'.vec view) : fragment =
    !\\(view, $'"leptos::prelude::Fragment::new($0)"')

/// ### view_list_to_fragment
inl view_list_to_fragment (view : list view) : fragment =
    view
    |> am'.new_vec
    |> view_vec_to_fragment

/// ### element_to_view
inl element_to_view (view : view' (html_element _)) : view =
    !\\(view, $'"leptos::prelude::IntoAny::into_any($0)"')

/// ### view_to_fragment
inl view_to_fragment (view : view) : fragment =
    [ view ]
    |> view_list_to_fragment

/// ### fragment_to_view
inl fragment_to_view (fragment : fragment) : view =
    !\\(fragment, $'"leptos::prelude::AnyView::from($0)"')

/// ### element_to_fragment
inl element_to_fragment (view : view' (html_element _)) : fragment =
    view
    |> element_to_view
    |> view_to_fragment

/// ### (~:>) fragment
instance (~:>) fragment = fun x =>
    real
        typecase t with
        | array_base (view' (html_element ~el)) =>
            inl x = a x
            inl x = am.toList `a `int `(view' (html_element el)) x
            inl x = listm.map `(view' (html_element el)) `view (element_to_view `el) x
            view_list_to_fragment x
        | list (view' (html_element ~el)) =>
            inl x = listm.map `(view' (html_element el)) `view (element_to_view `el) x
            view_list_to_fragment x
        | list view =>
            view_list_to_fragment x
        | _ => x

/// ### (~:>) view
instance (~:>) view = fun x =>
    real
        typecase t with
        | view' (html_element _) => element_to_view x
        | _ => x

/// ### view_trait_to_element
inl view_trait_to_element (view : rust.impl into_view) : view' (html_element _) =
    $'!view |> unbox'

/// ### view_trait_to_route_definition
inl view_trait_to_route_definition (view : rust.impl into_view) : route_definition =
    $'!view |> unbox'

/// ### to_element_view
inl to_element_view (view : view' (html_element _)) : rust.impl into_view =
    $'!view |> unbox'

/// ### to_view_trait
inl to_view_trait (view : view) : rust.impl into_view =
    $'!view |> unbox'

/// ### to_fragment_unbox
inl to_fragment_unbox view : fragment =
    $'!view |> unbox'

/// ### from_fragment_unbox
inl from_fragment_unbox (fragment : fragment) =
    $'!fragment |> unbox'

/// ### element_to_view_trait
inl element_to_view_trait (macro : view' (html_element _)) : rust.impl into_view =
    global "#if FABLE_COMPILER\nFable.Core.RustInterop.emitRustExpr () \");\nuse leptos::prelude::ElementChild;\n//\"\n#endif"
    !\($'"leptos::prelude::view\! { {!macro} }"')

/// ### macro_to_view_trait
inl macro_to_view_trait (macro : string) : rust.impl into_view =
    global "#if FABLE_COMPILER\nFable.Core.RustInterop.emitRustExpr () \");\nuse leptos::prelude::ElementChild;\n//\"\n#endif"
    global "#if FABLE_COMPILER\nFable.Core.RustInterop.emitRustExpr () \");\nuse leptos::prelude::ClassAttribute;\n//\"\n#endif"
    !\($'"leptos::prelude::view\! { " + !macro + " }"')

/// ### macro_to_fragment
inl macro_to_fragment (macro : string) : fragment =
    global "#if FABLE_COMPILER\nFable.Core.RustInterop.emitRustExpr () \");\nuse leptos::prelude::ElementChild;\n//\"\n#endif"
    !\($'"leptos::prelude::view\! { " + !macro + " }"')

/// ### new_transparent
inl new_transparent x : transparent =
    !\\(x, $'"leptos::leptos_dom::Transparent::new($0)"')

/// ### closure_to_view
inl closure_to_view (closure : rust.func0 view) : view =
    !\($'"leptos::prelude::IntoAny::into_any(move || !closure())"')

/// ### vec_to_view
inl vec_to_view (views : am'.vec view) : view =
    !\\(views, $'"leptos::prelude::IntoAny::into_any($0)"')

/// ### view_list_to_view
inl view_list_to_view (views : list view) : view =
    views
    |> am'.new_vec
    |> vec_to_view

/// ### to_fragment
inl to_fragment x : fragment =
    $'!x |> unbox'

/// ### text_to_view
inl text_to_view (text : string) : view =
    inl text = text |> sm'.to_std_string
    !\\(text, $'"leptos::prelude::IntoAny::into_any(leptos::prelude::IntoView::into_view($0))"')

/// ### text_to_fragment
inl text_to_fragment (text : string) : fragment =
    text
    |> text_to_view
    |> view_to_fragment

/// ### macro_to_view
inl macro_to_view (macro : string) : view =
    global "#if FABLE_COMPILER\nFable.Core.RustInterop.emitRustExpr () \");\nuse leptos::prelude::ElementChild;\n//\"\n#endif"
    !\($'"leptos::prelude::IntoAny::into_any(leptos::prelude::view\! { " + !macro + " })"')

/// ### macro_to_view'
inl macro_to_view' (macro : string) : view' infer =
    global "#if FABLE_COMPILER\nFable.Core.RustInterop.emitRustExpr () \");\nuse leptos::prelude::ElementChild;\n//\"\n#endif"
    !\($'"leptos::IntoView::into_view(leptos::prelude::view\! { " + !macro + " })"')

/// ### macro_to_view''
inl macro_to_view'' (macro : string) : view' infer =
    global "#if FABLE_COMPILER\nFable.Core.RustInterop.emitRustExpr () \");\nuse leptos::prelude::ElementChild;\n//\"\n#endif"
    !\($'"leptos::prelude::view\! { " + !macro + " }"')

/// ### macro_to_view'''
inl macro_to_view''' (macro : string) : view' _ =
    global "#if FABLE_COMPILER\nFable.Core.RustInterop.emitRustExpr () \");\nuse leptos::prelude::ElementChild;\n//\"\n#endif"
    !\($'"leptos::IntoView::into_view(leptos::prelude::view\! { " + !macro + " })"')

/// ### into_any_view
inl into_any_view (view : view' _) : view =
    !\\(view, $'"leptos::prelude::IntoAny::into_any($0)"')

/// ### into_any_view'
inl into_any_view' (view : view' _) : view =
    !\\(view, $'"&leptos::prelude::IntoAny::into_any($0)"')

/// ### transparent_to_view
inl transparent_to_view (transparent : transparent) : view =
    !\\(transparent, $'"leptos::prelude::IntoAny::into_any($0)"')

/// ### transparent_to_fragment
inl transparent_to_fragment (transparent : transparent) : fragment =
    transparent
    |> transparent_to_view
    |> view_to_fragment

/// ### macro_to_element
inl macro_to_element (view : string) : view' (html_element _) =
    view |> macro_to_view_trait |> view_trait_to_element

/// ### transparents_fragment
inl transparents_fragment (items : array_base transparent) : fragment =
    inl items = items |> am'.to_vec
    !\\((items, transparent_to_view), $'"$0.iter().map(|x| $1(x.clone())).collect::<Fragment>()"')

/// ### new_text
inl new_text (text : string) : text =
    !\\(text, $'"leptos::tachys::renderer::dom::Dom::create_text_node(&*$0)"')

/// ### text_view
inl text_view (text : string) : view =
    text
    |> text_to_view

/// ### text_fragment
inl text_fragment (text : string) : fragment =
    text
    |> text_view
    |> view_to_fragment

/// ### provide_meta_context
inl provide_meta_context () =
    (!\($'"true; leptos_meta::provide_meta_context()"') : bool) |> ignore

/// ### provide_context
inl provide_context forall t. (x : t) =
    (!\\(x, $'$"true; leptos::context::provide_context::<std::sync::Arc<`t>>($0)"') : bool) |> ignore

/// ### create_signal
inl create_signal forall t. (value : t) : read_signal t * write_signal t =
    !\\(value, $'$"leptos::prelude::signal($0)"')

/// ### new_rw_signal
inl new_rw_signal forall t. (value : t) : rw_signal t =
    !\\(value, $'$"leptos::prelude::RwSignal::new($0)"')

/// ### new_arc_rw_signal
inl new_arc_rw_signal forall t. (value : t) : arc_rw_signal t =
    !\\(value, $'$"leptos::prelude::ArcRwSignal::new($0)"')

/// ### read_only
inl read_only forall t. (value : rw_signal t) : read_signal t =
    !\\(value, $'$"leptos::prelude::RwSignal::read_only(&$0)"')

/// ### write_only
inl write_only forall t. (value : rw_signal t) : write_signal t =
    !\\(value, $'$"leptos::prelude::RwSignal::write_only(&$0)"')

/// ### typecheck_signal
inl typecheck_signal forall (t : * -> *) u. (signal : t u) : () =
    real
        typecase t with
        | signal => ()
        | arc_signal => ()
        | rw_signal => ()
        | arc_rw_signal => ()
        | read_signal => ()
        | arc_read_signal => ()
        | write_signal => ()
        | arc_write_signal => ()
        | memo => ()
        | arc_memo => ()
        | _ => error_type `(()) ("invalid signal", ``(t u))

/// ### memo_get'
inl memo_get' forall t. (memo : memo t) : t =
    !\\(memo, $'$"$0()"')

/// ### signal_get'
inl signal_get' forall (t : * -> *) u. (signal : t u) : u =
    signal |> typecheck_signal
    inl code =
        real
            typecase t with
            | signal => $'$"leptos::prelude::Signal::get(&$0)"' : string
            | arc_signal => $'$"leptos::prelude::ArcSignal::get(&$0)"' : string
            | rw_signal => $'$"leptos::prelude::RwSignal::get(&$0)"' : string
            | arc_rw_signal => $'$"leptos::prelude::ArcRwSignal::get(&$0)"' : string
            | read_signal => $'$"leptos::prelude::ReadSignal::get(&$0)"' : string
            | arc_read_signal => $'$"leptos::prelude::ArcReadSignal::get(&$0)"' : string
            | write_signal => $'$"leptos::prelude::WriteSignal::get(&$0)"' : string
            | arc_write_signal => $'$"leptos::prelude::ArcWriteSignal::get(&$0)"' : string
            | memo => $'$"leptos::prelude::Memo::get(&$0)"' : string
            | arc_memo => $'$"leptos::prelude::ArcMemo::get(&$0)"' : string
    !\\(signal, code) : u

/// ### signal_get signal
instance signal_get signal = signal_get'
instance signal_get arc_signal = signal_get'

/// ### signal_get rw_signal
instance signal_get rw_signal = signal_get'
instance signal_get arc_rw_signal = signal_get'

/// ### signal_get read_signal
instance signal_get read_signal = signal_get'
instance signal_get arc_read_signal = signal_get'

/// ### signal_get memo
instance signal_get memo = signal_get'
instance signal_get arc_memo = signal_get'

/// ### signal_update'
inl signal_update' forall (t : * -> *) u. (fn : u -> u) (signal : t u) : () =
    signal |> typecheck_signal
    inl code =
        real
            typecase t with
            | signal => $'$"true; leptos::prelude::Signal::update(&$0, |x: &mut /*"' : string
            | arc_signal => $'$"true; leptos::prelude::ArcSignal::update(&$0, |x: &mut /*"' : string
            | rw_signal => $'$"true; leptos::prelude::RwSignal::update(&$0, |x: &mut /*"' : string
            | arc_rw_signal => $'$"true; leptos::prelude::ArcRwSignal::update(&$0, |x: &mut /*"' : string
            | read_signal => $'$"true; leptos::prelude::ReadSignal::update(&$0, |x: &mut /*"' : string
            | arc_read_signal => $'$"true; leptos::prelude::ArcReadSignal::update(&$0, |x: &mut /*"' : string
            | write_signal => $'$"true; leptos::prelude::WriteSignal::update(&$0, |x: &mut /*"' : string
            | arc_write_signal => $'$"true; leptos::prelude::ArcWriteSignal::update(&$0, |x: &mut /*"' : string
            | memo => $'$"true; leptos::prelude::Memo::update(&$0, |x: &mut /*"' : string
            | arc_memo => $'$"true; leptos::prelude::ArcMemo::update(&$0, |x: &mut /*"' : string
    (!\\(signal, code) : bool) |> ignore
    (null () : rust.type_emit u) |> ignore
    (!\\(fn, $'"*/ | { *x = $0(x.clone()) }); //"') : bool) |> ignore

/// ### signal_update rw_signal
instance signal_update rw_signal = signal_update'
instance signal_update arc_rw_signal = signal_update'

/// ### signal_update write_signal
instance signal_update write_signal = signal_update'
instance signal_update arc_write_signal = signal_update'

/// ### signal_get_untracked'
inl signal_get_untracked' forall (t : * -> *) u. (signal : t u) : u =
    signal |> typecheck_signal
    inl signal = signal |> rust.box_pin
    inl code =
        real
            typecase t with
            | signal => $'$"leptos::prelude::Signal::get_untracked(&$0)"' : string
            | arc_signal => $'$"leptos::prelude::ArcSignal::get_untracked(&$0)"' : string
            | rw_signal => $'$"leptos::prelude::RwSignal::get_untracked(&$0)"' : string
            | arc_rw_signal => $'$"leptos::prelude::ArcRwSignal::get_untracked(&$0)"' : string
            | read_signal => $'$"leptos::prelude::ReadSignal::get_untracked(&$0)"' : string
            | arc_read_signal => $'$"leptos::prelude::ArcReadSignal::get_untracked(&$0)"' : string
            | write_signal => $'$"leptos::prelude::WriteSignal::get_untracked(&$0)"' : string
            | arc_write_signal => $'$"leptos::prelude::ArcWriteSignal::get_untracked(&$0)"' : string
            | memo => $'$"leptos::prelude::Memo::get_untracked(&$0)"' : string
            | arc_memo => $'$"leptos::prelude::ArcMemo::get_untracked(&$0)"' : string
    !\\(signal, code) : u

/// ### signal_get_untracked rw_signal
instance signal_get_untracked rw_signal = signal_get_untracked'
instance signal_get_untracked arc_rw_signal = signal_get_untracked'

/// ### signal_get_untracked read_signal
instance signal_get_untracked read_signal = signal_get_untracked'
instance signal_get_untracked arc_read_signal = signal_get_untracked'

/// ### signal_get_untracked memo
instance signal_get_untracked memo = signal_get_untracked'
instance signal_get_untracked arc_memo = signal_get_untracked'

/// ### signal_set'
inl signal_set' forall (t : * -> *) u. (value : u) (signal : t u) =
    signal |> typecheck_signal
    inl code =
        real
            typecase t with
            | signal => $'$"true; leptos::prelude::Signal::set(&$0, $1); //"' : string
            | arc_signal => $'$"true; leptos::prelude::ArcSignal::set(&$0, $1); //"' : string
            | rw_signal => $'$"true; leptos::prelude::RwSignal::set(&$0, $1); //"' : string
            | arc_rw_signal => $'$"true; leptos::prelude::ArcRwSignal::set(&$0, $1); //"' : string
            | read_signal => $'$"true; leptos::prelude::ReadSignal::set(&$0, $1); //"' : string
            | arc_read_signal => $'$"true; leptos::prelude::ArcReadSignal::set(&$0, $1); //"' : string
            | write_signal => $'$"true; leptos::prelude::WriteSignal::set(&$0, $1); //"' : string
            | arc_write_signal => $'$"true; leptos::prelude::ArcWriteSignal::set(&$0, $1); //"' : string
            | memo => $'$"true; leptos::prelude::Memo::set(&$0, $1); //"' : string
            | arc_memo => $'$"true; leptos::prelude::ArcMemo::set(&$0, $1); //"' : string
    (!\\((signal, value), code) : bool) |> ignore

/// ### signal_set rw_signal
instance signal_set rw_signal = signal_set'
instance signal_set arc_rw_signal = signal_set'

/// ### signal_set write_signal
instance signal_set write_signal = signal_set'
instance signal_set arc_write_signal = signal_set'

/// ### new_local_resource
inl new_local_resource forall t u.
    (source : () -> t)
    (fetcher : t -> async.future_pin u)
    : local_resource t u
    =
    // inl fetcher x = rust.move fun () =>
    //    fetcher x
    // inl fetcher = join fetcher
    // !\($'"leptos::create_local_resource(move || !source(), move |x| async move { !fetcher(x)().await })"')

    // ---

    // inl fn x = async.new_future fun () =>
    //     inl x' = fetcher x
    //     x' |> async.await

    // !\\((source, fn), $'"leptos::create_local_resource(move || $0(), |x| async move { $1(x).await })"')

    inl fetcher = fetcher |> rust.func1_from
    inl fetcher x =
        fetcher |> rust.func1_move x

    !\\((source, fetcher), $'"leptos::prelude::LocalResource::new(move || $0(), |x| async move { $1(x).await })"')

/// ### new_arc_local_resource
inl new_arc_local_resource forall t.
    (fetcher : () -> async.future_pin t)
    : arc_local_resource t
    =
    // inl fetcher x = rust.move fun () =>
    //    fetcher x
    // inl fetcher = join fetcher
    // !\($'"leptos::create_local_resource(move || !source(), move |x| async move { !fetcher(x)().await })"')

    // ---

    // inl fn x = async.new_future fun () =>
    //     inl x' = fetcher x
    //     x' |> async.await

    // !\\((source, fn), $'"leptos::create_local_resource(move || $0(), |x| async move { $1(x).await })"')

    inl fetcher = fetcher |> rust.func0_from

    !\\(fetcher, $'"leptos::prelude::ArcLocalResource::new(|| async move { $0().await })"')

/// ### new_resource
// inl new_resource forall t u. (source : () -> t) (fetcher : t -> async.future_pin u) : resource t u =
//     inl source = join source
//     !\\(fetcher, $'"leptos::Resource::new(move || !source(), |x| async move { $0(x).await })"')

/// ### new_action
inl new_action forall t u. (action_fn : t -> async.future_pin u) : action t u =
    inl action_fn = action_fn |> rust.func1_from
    inl action_fn x =
        action_fn |> rust.func1_move x
    !\\(action_fn, $'"leptos::prelude::Action::new(move |value: &std::sync::Arc<`t>| $0(value.clone()))"')

/// ### new_arc_action
inl new_arc_action forall t u. (action_fn : t -> async.future_pin u) : arc_action t u =
    // inl action_fn = action_fn |> rust.func1_from
    inl action_fn = action_fn |> rust.func1_from
    inl action_fn x =
        action_fn |> rust.func1_move x
    !\\(action_fn, $'"leptos::prelude::ArcAction::new(move |value: &std::sync::Arc<`t>| $0(value.clone()))"')

/// ### action_dispatch
inl action_dispatch forall t u. (value : heap t) (action : action (heap t) u) : () =
    (!\\((action, value), $'"true; leptos::prelude::Action::dispatch(&$0, $1.clone())"') : bool) |> ignore

/// ### arc_action_dispatch
inl arc_action_dispatch forall t u. (value : heap t) (action : arc_action (heap t) u) : () =
    (!\\((action, value), $'"true; leptos::prelude::ArcAction::dispatch(&$0, $1.clone())"') : bool) |> ignore

/// ### action_input
inl action_input forall t u. (action : action (heap t) u) : rw_signal (optionm'.option' t) =
    !\\(action, $'"leptos::prelude::Action::input(&$0)"')

/// ### action_pending
inl action_pending forall t u. (action : action (heap t) u) : memo bool =
    !\\(action, $'"leptos::prelude::Action::pending(&$0)"')

/// ### arc_action_pending
inl arc_action_pending forall t u. (action : arc_action (heap t) u) : arc_memo bool =
    !\\(action, $'"leptos::prelude::ArcAction::pending(&$0)"')

/// ### action_value
inl action_value forall t u. (action : action (heap t) u) : rw_signal (optionm'.option' u) =
    !\\(action, $'"leptos::prelude::Action::value(&$0)"')

/// ### arc_action_value
inl arc_action_value forall t u. (action : arc_action (heap t) u) : arc_rw_signal (optionm'.option' u) =
    !\\(action, $'"leptos::prelude::ArcAction::value(&$0)"')

/// ### use_context
inl use_context forall t. () : optionm'.option' t =
    !\($'"leptos::context::use_context::<std::sync::Arc<`t>>()"')

/// ### local_resource_loading
inl local_resource_loading forall t u. (resource : local_resource t u) : signal bool =
    !\\(resource, $'$"leptos::prelude::pending(&$0).into()"')

/// ### arc_local_resource_loading
inl arc_local_resource_loading forall t. (resource : arc_local_resource t) : arc_signal bool =
    !\\(resource, $'$"leptos::prelude::Submission::pending(&$0.into()).into()"')

/// ### resource_get
inl resource_get forall t u. (resource : resource t u) : optionm'.option' u =
    !\\(resource, $'$"leptos::prelude::Resource::get(&$0)"')

/// ### local_resource_get
inl local_resource_get forall t u. (resource : local_resource t u) : optionm'.option' u =
    !\\(resource, $'$"leptos::prelude::LocalResource::get(&$0)"')

/// ### arc_local_resource_get
inl arc_local_resource_get forall t. (resource : arc_local_resource t) : optionm'.option' t =
    !\\(resource, $'$"Option::map(leptos::prelude::ArcLocalResource::get(&$0), |x| x.clone())"')

/// ### resource_with
inl resource_with forall t u v. (resource : resource t u) (fn : optionm'.option' u -> v) : v =
    !\\((resource, fn), $'$"leptos::prelude::SignalWith::with(&$0, |x| $1(x.clone()))"')

/// ### new_effect
inl new_effect (fn : () -> ()) : () =
    inl fn = fn |> rust.func0_from
    (!\($'"true; leptos::prelude::Effect::new(move |_| { !fn() })"') : bool) |> ignore

/// ### interval_handle_clear
inl interval_handle_clear (interval_handle : interval_handle) =
    (!\\(interval_handle, $'$"true; leptos::leptos_dom::helpers::IntervalHandle::clear(&$0)"') : bool) |> ignore

/// ### set_interval_with_handle
inl set_interval_with_handle
    (fn : () -> ())
    (interval_millis : int)
    : resultm.result' interval_handle wasm.js_value
    =
    inl fn = fn |> rust.func0_from
    !\\((fn, interval_millis), $'$"leptos::set_interval_with_handle(move || $0(), $1)"')

/// ### new_memo
inl new_memo forall t. (fn : () -> t) : memo t =
    // inl fn = fn |> rust.func0_from
    !\\(fn, $'"leptos::prelude::Memo::new(move |_| { $0() })"')

/// ### new_arc_memo
inl new_arc_memo forall t. (fn : () -> t) : arc_memo t =
    // inl fn = fn |> rust.func0_from
    !\\(fn, $'"leptos::prelude::ArcMemo::new(move |_| { $0() })"')

/// ### window
let window () : wasm.window =
    !\($'"leptos::prelude::window()"')

/// ### bool_prop
inl bool_prop (prop : string) (fn : () -> bool) : string =
    inl fn = join fn
    $'"" + !prop + "={move || !fn()}"'

/// ### concat_props
inl concat_props props =
    ("", props)
    ||> listm.fold fun acc (x : string) =>
        $'" " + !x + !acc + ""'

/// ### move_to_fragment
inl move_to_fragment fn =
    fn
    |> rust.move
    |> rust.func0_move

/// ### tag_raw
inl tag_raw tag props children =
    global "#if FABLE_COMPILER\nFable.Core.RustInterop.emitRustExpr () \");\nuse leptos::prelude::*;\n//\"\n#endif"
    inl tag : string = tag
    inl props = props |> concat_props
    inl children =
        children ()
        |> fragment_to_view
    // inl children = children |> rust.box_pin
    // inl children = join children
    // inl children = join children
    // inl children = join children
    // inl children = children >> fragment_to_view
    // inl children : rust.func0 view = !\\(children, $'$"(|| $0)()"')
    $'"<" + !tag + " " + !props + ">move || { !children }</" + !tag + ">"'

/// ### tag_element
inl tag_element tag props children : view' (html_element _) =
    tag_raw tag props children
    |> macro_to_element

/// ### tag_closed_raw
inl tag_closed_raw tag props =
    inl tag : string = tag
    inl props = props |> concat_props
    $'"<" + !tag + " " + !props + " />"'

/// ### tag_closed
inl tag_closed tag props : view' (html_element _) =
    tag_closed_raw tag props
    |> macro_to_element

/// ### for
inl for props : view =
    tag_closed_raw "leptos::prelude::For" props
    |> macro_to_view

/// ### for
inl for forall t u (signal : * -> *).
    (signal : signal (am'.vec t))
    (key_fn : t -> u)
    (children' : t -> fragment)
    : view
    =
    signal |> typecheck_signal
    inl signal = signal |> rust.emit
    inl key_fn = key_fn |> rust.func1_from
    inl key_fn x =
        key_fn |> rust.func1_move x
    inl key_fn = join key_fn
    inl children' = (children' >> fragment_to_view) |> rust.func1_from
    inl children' x =
        children' |> rust.func1_move x
    for [
        $'"each=!signal"'
        $'"key=move |x| !key_fn(x.to_owned())"'
        $'"let:x"'
        $'"children=move |x| !children'(x)"'
    ]

/// ### show
inl show props : view =
    tag_closed_raw "leptos::prelude::Show" props
    |> macro_to_view

/// ### show
inl show (when_fn : () -> bool) (fallback : () -> view) (children : () -> fragment) : view =
    inl when_fn = join when_fn
    inl when_fn = join when_fn
    inl fallback = join fallback
    inl children = join children
    show [
        $'"when=move || !when_fn()"'
        $'"fallback=move || !fallback()"'
        $'"children=std::rc::Rc::new(move || !children())"'
    ]

/// ### use_location
inl use_location () : location =
    !\($'"leptos_router::hooks::use_location()"')

/// ### use_navigate
inl use_navigate () : string -> () =
    inl navigate : threading.arc (rust.dyn' (rust.action_fn2 (rust.ref sm'.str) navigate_options)) =
        !\($'"std::sync::Arc::new(leptos_router::hooks::use_navigate())"')
    fun url =>
        inl url = url |> sm'.as_str
        !\\((navigate, url), $'"$0($1, Default::default())"')

/// ### location_hash
inl location_hash (location : location) : memo sm'.std_string =
    !\\(location, $'"$0.hash"')

/// ### location_pathname
inl location_pathname (location : location) : memo sm'.std_string =
    !\\(location, $'"$0.pathname"')

/// ### location_search
inl location_search (location : location) : memo sm'.std_string =
    !\\(location, $'"$0.search"')

/// ### url_try_from
inl url_try_from (s : rust.ref sm'.str) : resultm.result' url sm'.std_string =
    !\\(s, $'"leptos_router::location::Url::try_from($0)"')

/// ### url_pathname
inl url_pathname (url : url) : sm'.std_string =
    !\\(url, $'"$0.pathname"')

/// ### use_url
inl use_url () =
    inl location = use_location ()

    fun () =>
        inl url_pathname = location |> location_pathname |> signal_get |> sm'.from_std_string
        inl url_search = location |> location_search |> signal_get |> sm'.from_std_string
        inl url_search =
            if url_search = ""
            then ""
            else $'$"?{!url_search}"'
        url_pathname +. url_search
    |> new_arc_memo

/// ### route
inl route path view children : view' nested_route =
    inl path = path |> sm'.to_std_string
    inl path = join path
    // inl view = view |> rust.move
    inl view () =
        view () |> fragment_to_view
    inl view = join view
    tag_closed_raw "leptos_router::components::ParentRoute" [
        $'"path=leptos_router::path\!(!path)"'
        $'"view= move || !view()"'
        $'"children=Box::new(move || !children())"'
    ]
    |> macro_to_view'''

/// ### macro_to_view
inl macro_to_view (macro : string) : view =
    global "#if FABLE_COMPILER\nFable.Core.RustInterop.emitRustExpr () \");\nuse leptos::prelude::ElementChild;\n//\"\n#endif"
    !\($'"leptos::prelude::IntoAny::into_any(leptos::prelude::view\! { " + !macro + " })"')

/// ### router
inl router children : view =
    // inl children : () -> fragment = join children
    tag_closed_raw "leptos_router::components::Router" [
        $'"children=Box::new(move || !children())"'
    ]
    |> macro_to_view'
    |> into_any_view

/// ### routes
inl routes children : view =
    inl children : () -> am'.vec (view' nested_route) = join children
    inl children = join children
    inl fallback = "leptos.routes / fallback" |> text_view
    tag_closed_raw "leptos_router::components::Routes" [
        $'"fallback=move || !fallback"'
        $'"children=leptos::children::ToChildren::to_children(move || !children())"'
    ]
    |> macro_to_view'
    |> into_any_view

/// ### a'
inl a' props children : _ (_ a') =
    tag_element "a" props children

/// ### button
inl button props children : _ (_ button) =
    tag_element "button" props children

/// ### details
inl details props children : _ (_ details) =
    tag_element "details" props children

/// ### div
inl div props children : _ (_ div) =
    tag_element "div" props children

/// ### footer
inl footer props children : _ (_ footer) =
    tag_element "footer" props children

/// ### header
inl header props children : _ (_ header) =
    tag_element "header" props children

/// ### label
inl label props children : _ (_ label) =
    tag_element "label" props children

/// ### main
inl main props children : _ (_ main) =
    tag_element "main" props children

inl main' () = ()

/// ### nav
inl nav props children : _ (_ nav) =
    tag_element "nav" props children

/// ### option'
inl option' props children : _ (_ option') =
    tag_element "option" props children

/// ### option'
inl option' selected children : _ (_ option') =
    inl selected : () -> bool = join selected
    option' [
        $'"selected=!selected()"'
    ] fun () =>
        children |> text_to_fragment

/// ### pre
inl pre props children : _ (_ pre) =
    tag_element "pre" props children

/// ### select
inl select props children : _ (_ select) =
    tag_element "select" props children

/// ### span
inl span props children : _ (_ span) =
    tag_element "span" props children

/// ### summary
inl summary props children : _ (_ summary) =
    tag_element "summary" props children

/// ### table
inl table props children : _ (_ table) =
    tag_element "table" props children

/// ### thead
inl thead props children : _ (_ thead) =
    tag_element "thead" props children

/// ### tbody
inl tbody props children : _ (_ tbody) =
    tag_element "tbody" props children

/// ### tr
inl tr props children : _ (_ tr) =
    tag_element "tr" props children

/// ### th
inl th props children : _ (_ th) =
    tag_element "th" props children

/// ### td
inl td props children : _ (_ td) =
    tag_element "td" props children

/// ### svg
inl svg props children : _ (_ svg) =
    tag_element "svg" props children

/// ### path
inl path props : _ (_ path) =
    tag_element "path" props (fun () => [] |> view_list_to_fragment)

/// ### circle
inl circle props : _ (_ circle) =
    tag_element "circle" props (fun () => [] |> view_list_to_fragment)

/// ### rect
inl rect props children : _ (_ rect) =
    tag_element "rect" props children

/// ### animate
inl animate props : _ (_ animate) =
    tag_element "animate" props (fun () => [] |> view_list_to_fragment)

/// ### input
inl input props : _ (_ input) =
    tag_closed "input" props

/// ### dd
inl dd props children : _ (_ dd) =
    tag_element "dd" props children

/// ### dl
inl dl props children : _ (_ dl) =
    tag_element "dl" props children

/// ### dt
inl dt props children : _ (_ dt) =
    tag_element "dt" props children
