module IHP.IDE.CodeGen.View.NewApplication where import IHP.ViewPrelude import IHP.IDE.ToolServer.Types import IHP.IDE.CodeGen.Types import IHP.IDE.CodeGen.View.Generators (renderPlan) data NewApplicationView = NewApplicationView { plan :: Either Text [GeneratorAction] , applicationName :: Text } instance View NewApplicationView where html NewApplicationView { .. } = [hsx|
{renderFlashMessages}
{if isEmpty then renderEmpty else renderPreview} {unless isEmpty (renderPlan plan)}
|] where renderEmpty = [hsx|
|] renderPreview = [hsx|
{applicationName}
|] isEmpty = null applicationName