var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
  for (var name in all)
    __defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
  if (from && typeof from === "object" || typeof from === "function") {
    for (let key of __getOwnPropNames(from))
      if (!__hasOwnProp.call(to, key) && key !== except)
        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
  }
  return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var stdin_exports = {};
__export(stdin_exports, {
  GridContent: () => GridContent
});
module.exports = __toCommonJS(stdin_exports);
var import_vue = require("vue");
var import_pro_utils = require("@antdv/pro-utils");
var import_context = require("ant-design-vue/lib/config-provider/context");
var import_vue2 = require("vue");
var import_RouteContext = require("../../context/RouteContext");
var import_style = require("./style");
const GridContent = (0, import_vue2.defineComponent)({
  name: "GridContent",
  inheritAttrs: false,
  props: {
    contentWidth: (0, import_pro_utils.stringType)(),
    prefixCls: (0, import_pro_utils.stringType)()
  },
  setup(props, {
    attrs,
    slots
  }) {
    const value = import_RouteContext.RouteContext.useContext();
    const {
      getPrefixCls
    } = (0, import_context.useConfigContextInject)();
    const prefixCls = (0, import_vue2.computed)(() => props.prefixCls || getPrefixCls("pro"));
    const contentWidth = (0, import_vue2.computed)(() => props.contentWidth || value.contentWidth);
    const gridClassName = (0, import_vue2.computed)(() => `${prefixCls.value}-grid-content`);
    const {
      wrapSSR,
      hashId
    } = (0, import_style.useStyle)(gridClassName);
    return () => {
      var _a;
      const isWide = contentWidth.value === "Fixed" && value.layout === "top";
      return wrapSSR((0, import_vue.createVNode)("div", {
        "class": (0, import_pro_utils.classNames)(gridClassName.value, hashId.value, attrs.class || "", {
          [`${gridClassName.value}-wide`]: isWide
        }),
        "style": attrs.style
      }, [(0, import_vue.createVNode)("div", {
        "class": `${prefixCls.value}-grid-content-children ${hashId.value}`.trim()
      }, [(_a = slots.default) == null ? void 0 : _a.call(slots)])]));
    };
  }
});
