'use strict';

var index = require('./index-p7cvUYAE.js');
var parts = require('./parts-BXshb_S-.js');

const ErrorState = (errorMessage) => (index.h("main", { class: "p-4 d-flex justify-content-center text-center", style: { fontSize: "1.2rem" } }, index.h("p", { part: parts.text }, errorMessage)));
const DetailSectionTitle = (props) => (index.h("h2", { part: parts.heading2, class: "mt-4 fs-5 border-bottom pb-3" }, props.sectionTitle));
const DetailItem = ({ title, value, onClick, }) => title && value ? (index.h("div", { class: "row justify-content-between" }, index.h("div", { class: "col-12 col-md-4" }, index.h("span", { class: "fw-bold", part: parts.text }, title)), index.h("div", { class: `col-12 col-md-8 ${onClick ? "text-decoration-underline text-primary" : ""}`, style: { cursor: onClick ? "pointer" : "auto" }, onClick: () => onClick && onClick() }, index.h("span", { class: "text-wrap", part: onClick ? parts.link : parts.text }, value)))) : null;
const EntityHeadInfoItem = ({ title, value, classes, }) => (index.h("div", { class: `d-flex flex-column ${classes}` }, index.h("span", { class: "fw-bold border-1 border-bottom ps-2 pe-2", part: parts.heading2 }, title), index.h("span", { class: "pt-2 ps-2 pe-2", part: parts.text }, value)));
const EntityHeadInfo = ({ title, slot, badge }, children) => (index.h("div", { slot: slot, class: "p-2" }, index.h("div", { class: "d-flex flex-row align-items-center gap-2 mb-2" }, index.h("h1", { class: "m-0", part: parts.heading1 }, title), badge), index.h("div", { class: "d-flex flex-row align-items-top", part: parts.text }, children)));
const CodeBlock = ({ metadata }) => metadata && Object.keys(metadata).length ? (index.h("div", { class: "mt-4" }, index.h("pre", { class: "p-2", "aria-label": "metadata content" }, index.h("code", null, JSON.stringify(metadata, null, 2))))) : null;

exports.CodeBlock = CodeBlock;
exports.DetailItem = DetailItem;
exports.DetailSectionTitle = DetailSectionTitle;
exports.EntityHeadInfo = EntityHeadInfo;
exports.EntityHeadInfoItem = EntityHeadInfoItem;
exports.ErrorState = ErrorState;
