package components import ( "tangled.org/arabica.social/arabica/internal/firehose" "tangled.org/arabica.social/arabica/internal/web/bff" "time" ) // EntityViewLayoutProps bundles everything a simple entity view page // renders: card-style header, an entity-specific body component, an // optional stat-line (e.g. "5 beans"), the action bar (like/share/edit/ // delete), and the comment section. Pages compose this with a // templ.Component body to avoid hand-cloning the 70-line shell per // entity. // // GuardActionBar gates rendering of ActionBar (and the gap-3 wrapper // around BackButton) behind a SubjectURI/SubjectCID non-empty check — // oolong views use this because freshly-created records may not yet be // indexed by the firehose; arabica views always render the bar. type EntityViewLayoutProps struct { RecordType string Title string CreatedAt time.Time AuthorDID string AuthorHandle string AuthorDisplayName string AuthorAvatar string Body templ.Component StatLine templ.Component ActionBar ActionBarProps GuardActionBar bool Comments []firehose.IndexedComment IsAuthenticated bool CurrentUserDID string ModCtx CommentModerationContext } templ EntityViewLayout(layout *LayoutData, props EntityViewLayoutProps) { @Layout(layout, EntityViewLayoutContent(props)) } templ EntityViewLayoutContent(props EntityViewLayoutProps) {