import { useLocal } from "lib/utils/use-local";
import { FC, useEffect } from "react";
import { breadcrumbPrefix } from "../utils/md-hash";
import { MDLocal, MDRef } from "../utils/typings";
import { MDHeader } from "./MDHeader";
import { hashSum } from "lib/utils/hash-sum";
export const should_show_tab = (md: MDLocal) => {
if (isEditor) {
if (md.tab.active !== "" && md.tab.active !== "master") return true;
}
return false;
};
export const MDDetail: FC<{ md: MDLocal; mdr: MDRef }> = ({ md, mdr }) => {
const detail = md.childs[md.tab.active];
const PassProp = mdr.PassProp;
if (md.internal.reset_detail) {
md.internal.reset_detail = false;
md.render();
return null;
}
if (!detail) {
return null;
}
return (
<>
{md.props.show_head === "only-child" &&