import { d8 as o, a8 as r, d9 as e, da as a, db as t, dc as i, dd as d, de as n, df as g, dg as s, dh as m } from "./index-f927b013.js";
import { useContext as l } from "react";
import { lI as c, lz as u } from "./ant-design-icons-6bfdc7d5.js";
import { u as $, a as p } from "./styled-components-7cfa37e6.js";
import "./axios-04f95181.js";
import "./redux-devtools-8dd21e4f.js";
import "./alasql-f60045ee.js";
import "./antd-2abdded3.js";
import "react-dom";
import "./dayjs-2035e031.js";
import "./lodash-b5661970.js";
import "./fontawesome-3904a214.js";
import "./dnd-kit-8227a2db.js";
import "./moment-059406e8.js";
import "./numbro-47982265.js";
import "./papaparse-07642d76.js";
import "./uuid-bd83cae2.js";
import "./supabase-b2e314d0.js";
import "./fetch-648a91f6.js";
import "./react-draggable-ed505bfc.js";
import "./remark-gfm-18306abe.js";
import "./buffer-d3713d77.js";
import "./rehype-raw-6ebcba88.js";
import "./parse5-f837f753.js";
import "./rehype-sanitize-953d0761.js";
import "./simplebar-react-2133d981.js";
import "./react-best-gradient-color-picker-92c01739.js";
import "./ua-parser-js-c952c07b.js";
import "./clsx-469c2c43.js";
import "./loglevel-b4003767.js";
import "./file-saver-55285fc1.js";
import "./codemirror-8412b963.js";
import "./really-relaxed-json-056be70b.js";
import "./immer-c0428a8d.js";
import "./hotkeys-js-699906bc.js";
import "./cnchar-e1339167.js";
import "./react-documents-041601c7.js";
import "./react-sortable-hoc-4fbe0c32.js";
import "./sql-formatter-577b4ab0.js";
import "./rc-trigger-3f038851.js";
import "./react-json-view-5330ce92.js";
import "./qrcode-react-d377d762.js";
const h = $.div`
${(o2) => o2.$animationStyle && o2.$animationStyle}
  display: flex;
  flex-flow: column;
  height: 100%;
  overflow-y: scroll;
  border: ${(o2) => o2.$style.borderWidth} ${(o2) => o2.$style.borderStyle ? o2.$style.borderStyle : "solid"} ${(o2) => o2.$style.border};
  border-radius: ${(o2) => o2.$style.radius};
  padding: ${(o2) => o2.$style.padding};
  margin: ${(o2) => o2.$style.margin};
  ${(r2) => o(r2.$style)}
`, b = $.div`
  ${(r2) => {
  return r2.$style && (e2 = r2.$style, p`
    border-radius: ${e2.radius ? e2.radius : "4px"};
    border: ${e2.borderWidth ? e2.borderWidth : "0px"} ${e2.borderStyle ? e2.borderStyle : "solid"} ${e2.border};
    color: ${e2.text};
    font-size: ${e2.textSize} !important;
    font-weight: ${e2.textWeight} !important;
    font-family: ${e2.fontFamily} !important;
    font-style:${e2.fontStyle} !important;
    text-transform:${e2.textTransform} !important;
    text-decoration:${e2.textDecoration} !important;
    ${o(e2)}

    .markdown-body a {
      color: ${e2.links};
    }
    .markdown-body {
      margin: ${e2.margin} !important;	
      padding: ${e2.padding};	
      width: ${g(e2.margin)};	
      // height: ${s(e2.margin)};
      h1 {
        line-height: 1.5;
      }
      h5 {
        line-height: 2.2;
      }
    }

    .markdown-body {
      &,
      p,
      div,
      h1,
      h2,
      h3,
      h4,
      h5,
      h6 {
        color: ${e2.text};
      }
      img,
      pre {
        background-color: ${e2.background};
        code {
          color: #000000;
        }
      }
      background-color: transparent;
    }
  `);
  var e2;
}}
  text-align: ${(o2) => o2.$horizontalAlignment};
  padding: ${(o2) => o2.$style.padding};
  margin: ${(o2) => o2.$style.margin};
`, k = $(m)`
  overflow: visible;
  border-radius: 0;
  ${(r2) => o({ background: r2.$backgroundColor, backgroundImage: r2.$headerBackgroundImage, backgroundImageSize: r2.$headerBackgroundImageSize, backgroundImageRepeat: r2.$headerBackgroundImageRepeat, backgroundImageOrigin: r2.$headerBackgroundImageOrigin, backgroundImagePosition: r2.$headerBackgroundImagePosition })}
`, y = $(m)`
  border-top: ${(o2) => `${o2.$showBorder ? o2.$borderWidth : 0} solid ${o2.$borderColor}`};
  flex: 1;
  border-radius: 0;
  ${(r2) => o({ background: r2.$backgroundColor, backgroundImage: r2.$bodyBackgroundImage, backgroundImageSize: r2.$bodyBackgroundImageSize, backgroundImageRepeat: r2.$bodyBackgroundImageRepeat, backgroundImageOrigin: r2.$bodyBackgroundImageOrigin, backgroundImagePosition: r2.$bodyBackgroundImagePosition })}
`, I = $(m)`
  border-top: ${(o2) => `${o2.$showBorder ? o2.$borderWidth : 0} solid ${o2.$borderColor}`};
  overflow: visible;
  ${(o2) => o2.$backgroundColor && `background-color: ${o2.$backgroundColor};`}
  border-radius: 0;
  ${(r2) => o({ background: r2.$backgroundColor, backgroundImage: r2.$footerBackgroundImage, backgroundImageSize: r2.$footerBackgroundImageSize, backgroundImageRepeat: r2.$footerBackgroundImageRepeat, backgroundImageOrigin: r2.$footerBackgroundImageOrigin, backgroundImagePosition: r2.$footerBackgroundImagePosition })}
`;
function f(o2) {
  const { container: g2, text: s2, animationStyle: m2 } = o2, { showHeader: $2, showFooter: p2, horizontalGridCells: f2 } = g2, B = g2.showBody || !$2 && !p2, { items: j, ...w } = g2.header, { items: x, ...S } = g2.body[0].children.view.getView(), { items: z, ...v } = g2.footer, P = l(r).getAppSettings().maxWidth;
  e(P);
  const { style: C, headerStyle: R, bodyStyle: O, footerStyle: W } = g2;
  return c(h, { $style: C, $animationStyle: m2, children: [$2 && u(a.Provider, { value: g2.style.background, children: u(k, { ...w, horizontalGridCells: f2, items: t(j), autoHeight: true, emptyRows: 5, minHeight: "46px", containerPadding: [0, 0], showName: { bottom: p2 ? 20 : 0 }, $backgroundColor: (R == null ? void 0 : R.headerBackground) || "transparent", $headerBackgroundImage: R == null ? void 0 : R.headerBackgroundImage, $headerBackgroundImageRepeat: R == null ? void 0 : R.headerBackgroundImageRepeat, $headerBackgroundImageSize: R == null ? void 0 : R.headerBackgroundImageSize, $headerBackgroundImagePosition: R == null ? void 0 : R.headerBackgroundImagePosition, $headerBackgroundImageOrigin: R == null ? void 0 : R.headerBackgroundImageOrigin, style: { padding: R.containerHeaderPadding } }) }), B && u(a.Provider, { value: g2.style.background, children: u(i, { style: { height: g2.autoHeight ? "auto" : "100%", margin: "0px", padding: "0px" }, hideScrollbar: !g2.showVerticalScrollbar, children: c("div", { style: { background: `${g2.style.background}` }, children: [u(y, { $showBorder: false, ...S, horizontalGridCells: f2, items: t(x), autoHeight: g2.autoHeight, emptyRows: 14, minHeight: $2 ? "143px" : "142px", containerPadding: [0, 0], hintPlaceholder: o2.hintPlaceholder ?? d, $backgroundColor: (O == null ? void 0 : O.background) || "transparent", $bodyBackgroundImage: O == null ? void 0 : O.backgroundImage, $bodyBackgroundImageRepeat: O == null ? void 0 : O.backgroundImageRepeat, $bodyBackgroundImageSize: O == null ? void 0 : O.backgroundImageSize, $bodyBackgroundImagePosition: O == null ? void 0 : O.backgroundImagePosition, $bodyBackgroundImageOrigin: O == null ? void 0 : O.backgroundImageOrigin, $borderColor: C == null ? void 0 : C.border, $borderWidth: C == null ? void 0 : C.borderWidth, style: { float: `${o2.float}`, width: "none" === o2.float ? "100%" : `${o2.width}%`, height: "100%", ...g2.bodyStyle } }), u(b, { $style: o2.style, $horizontalAlignment: o2.horizontalAlignment, children: u("p", { children: "markdown" === o2.type ? u(n, { children: s2.value }) : s2.value }) })] }) }) }), p2 && u(a.Provider, { value: g2.style.background, children: u(I, { $showBorder: $2, ...v, horizontalGridCells: f2, items: t(z), autoHeight: true, emptyRows: 5, minHeight: "48px", containerPadding: [0, 0], showName: { top: $2 ? 20 : 0 }, $backgroundColor: (W == null ? void 0 : W.footerBackground) || "transparent", $footerBackgroundImage: W == null ? void 0 : W.footerBackgroundImage, $footerBackgroundImageRepeat: W == null ? void 0 : W.footerBackgroundImageRepeat, $footerBackgroundImageSize: W == null ? void 0 : W.footerBackgroundImageSize, $footerBackgroundImagePosition: W == null ? void 0 : W.footerBackgroundImagePosition, $footerBackgroundImageOrigin: W == null ? void 0 : W.footerBackgroundImageOrigin, $borderColor: C == null ? void 0 : C.border, $borderWidth: C == null ? void 0 : C.borderWidth, style: { padding: W.containerFooterPadding } }) })] });
}
export {
  f as TriContainer
};
