import { t as _plugin_vue_export_helper_default } from "./_plugin-vue_export-helper-BmmBcIzD.js";
import { createBlock, createCommentVNode, createElementBlock, createElementVNode, defineComponent, guardReactiveProps, mergeProps, normalizeClass, normalizeProps, normalizeStyle, openBlock, renderSlot, resolveDynamicComponent, unref, withCtx } from "vue";
import { useBindCx } from "@scalar/components";
//#region src/components/DataTable/DataTable.vue?vue&type=script&setup=true&lang.ts
var _hoisted_1$1 = ["role"];
var _hoisted_2 = {
	key: 0,
	class: "sr-only"
};
//#endregion
//#region src/components/DataTable/DataTable.vue
var DataTable_default = /* @__PURE__ */ defineComponent({
	__name: "DataTable",
	props: {
		columns: {},
		scroll: { type: Boolean },
		presentational: { type: Boolean }
	},
	setup(__props) {
		const { cx } = useBindCx();
		return (_ctx, _cache) => {
			return openBlock(), createElementBlock("div", normalizeProps(guardReactiveProps(unref(cx)(__props.scroll ? "overflow-x-auto custom-scroll" : "overflow-visible", "scalar-data-table"))), [createElementVNode("table", {
				class: normalizeClass(["mb-0 grid min-h-8 auto-rows-auto", { "w-max min-w-full": __props.scroll }]),
				role: __props.presentational ? "presentation" : "table",
				style: normalizeStyle({ gridTemplateColumns: __props.columns.map((col) => col || "1fr").join(" ") })
			}, [_ctx.$slots.caption ? (openBlock(), createElementBlock("caption", _hoisted_2, [renderSlot(_ctx.$slots, "caption")])) : createCommentVNode("", true), renderSlot(_ctx.$slots, "default")], 14, _hoisted_1$1)], 16);
		};
	}
});
//#endregion
//#region src/components/DataTable/DataTableCell.vue
var DataTableCell_default = /* @__PURE__ */ defineComponent({
	inheritAttrs: false,
	__name: "DataTableCell",
	props: { is: { default: "td" } },
	setup(__props) {
		const { cx } = useBindCx();
		return (_ctx, _cache) => {
			return openBlock(), createBlock(resolveDynamicComponent(__props.is), mergeProps(unref(cx)("box-content max-h-8 min-h-8 min-w-8 border-l-0 border-t border-b-0 border-r flex text-base/5 last:border-r-0 group-last:border-b-transparent p-0 m-0 relative"), { class: "group-[.alert]:bg-b-alert group-[.error]:bg-b-danger" }), {
				default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
				_: 3
			}, 16);
		};
	}
});
//#endregion
//#region src/components/DataTable/DataTableRow.vue
var _sfc_main = {};
var _hoisted_1 = { class: "group contents" };
function _sfc_render(_ctx, _cache) {
	return openBlock(), createElementBlock("tr", _hoisted_1, [renderSlot(_ctx.$slots, "default")]);
}
var DataTableRow_default = /* @__PURE__ */ _plugin_vue_export_helper_default(_sfc_main, [["render", _sfc_render]]);
//#endregion
export { DataTableCell_default as n, DataTable_default as r, DataTableRow_default as t };

//# sourceMappingURL=DataTableRow-c3XveEUO.js.map