import { raw } from "hono/html";
import { Post } from "../../classes/post";
import {
AddPostToThreadButton, AddRepostsButton,
DeletePostButton, EditPostButton
} from "../buttons/posts";
import { RepostCountElement, RepostStatusIcon } from "./repostData";
type PostDataHeaderOptions = {
content: Post;
posted: boolean;
};
export function PostDataHeader(props: PostDataHeaderOptions) {
const content: Post = props.content;
// if this post can be manipulated in some way
const canBeEdited = !props.posted && !content.isRepost;
const canBeDeleted = (!props.posted || (content.isRepost && content.repostCount! > 0));
const canAddReposts = !content.isChildPost && props.posted && content.canAddMoreRepostRules();
// show the header if any of the above cases is true
const canSeeHeader = canBeEdited || canBeDeleted || canAddReposts;
return ();
};
type PostDataFooterOptions = {
content: Post;
posted: boolean;
};
export function PostDataFooter(props: PostDataFooterOptions) {
const content: Post = props.content;
const hasPosted: boolean = props.posted;
return ();
};