"use strict";
const common_vendor = require("../../../../common/vendor.js");
const uni_modules_uviewPro_libs_index = require("../../libs/index.js");
require("../../libs/util/logger.js");
require("../../libs/config/theme-tokens.js");
const uni_modules_uviewPro_components_uGrid_types = require("./types.js");
const uni_modules_uviewPro_libs_hooks_useCompRelation = require("../../libs/hooks/useCompRelation.js");
const __default__ = {
  name: "u-grid",
  options: {
    addGlobalClass: true,
    virtualHost: true,
    styleIsolation: "shared"
  }
};
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
  ...__default__,
  props: uni_modules_uviewPro_components_uGrid_types.GridProps,
  emits: ["click"],
  setup(__props, { expose: __expose, emit: __emit }) {
    const props = __props;
    const emit = __emit;
    uni_modules_uviewPro_libs_hooks_useCompRelation.useParent("u-grid");
    const gridStyle = common_vendor.computed(() => {
      const style = {};
      switch (props.align) {
        case "left":
          style.justifyContent = "flex-start";
          break;
        case "center":
          style.justifyContent = "center";
          break;
        case "right":
          style.justifyContent = "flex-end";
          break;
        default:
          style.justifyContent = "flex-start";
      }
      return style;
    });
    function click(index) {
      emit("click", index);
    }
    __expose({ click, props });
    return (_ctx, _cache) => {
      return {
        a: _ctx.border ? 1 : "",
        b: _ctx.customClass ? 1 : "",
        c: common_vendor.s(common_vendor.unref(uni_modules_uviewPro_libs_index.$u).toStyle(gridStyle.value, _ctx.customStyle))
      };
    };
  }
});
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-a828b844"]]);
wx.createComponent(Component);
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/uni_modules/uview-pro/components/u-grid/u-grid.js.map
