import "../styles/reset.css";
import "./container.less";
import { PropTypes as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_PropTypes__, withInstallProps as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_withInstallProps__ } from "../shared";
import { computed as __WEBPACK_EXTERNAL_MODULE_vue_computed__, createVNode as __WEBPACK_EXTERNAL_MODULE_vue_createVNode__, defineComponent as __WEBPACK_EXTERNAL_MODULE_vue_defineComponent__, inject as __WEBPACK_EXTERNAL_MODULE_vue_inject__, provide as __WEBPACK_EXTERNAL_MODULE_vue_provide__ } from "vue";
import { usePrefix as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_config_provider_fe8577a3_usePrefix__ } from "../config-provider";

;// external "../shared"

;// external "vue"

;// external "../config-provider"

;// ../../packages/container/src/interface.ts
/*
 * Tencent is pleased to support the open source community by making
 * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
 *
 * Copyright (C) 2025 Tencent.  All rights reserved.
 *
 * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
 *
 * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
 *
 * ---------------------------------------------------
 * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
 * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
 * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
 * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
 * the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
 * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
 * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
 * IN THE SOFTWARE.
 */
var containerKey = Symbol('containerProps');
;// ../../packages/container/src/col.tsx
/*
 * Tencent is pleased to support the open source community by making
 * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
 *
 * Copyright (C) 2025 Tencent.  All rights reserved.
 *
 * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
 *
 * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
 *
 * ---------------------------------------------------
 * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
 * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
 * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
 * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
 * the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
 * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
 * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
 * IN THE SOFTWARE.
 */




var colProps = {
  // 栅格的占位格数，可选值为 0~24 的整数，为 0 时，则为 col 相当于 width: 100%
  span: __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_PropTypes__.number.def(1),
  // 栅格的偏移
  offset: __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_PropTypes__.number.def(0),
  // 栅格向左移动格数
  pull: __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_PropTypes__.number.def(0),
  // 栅格向右移动格数
  push: __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_PropTypes__.number.def(0)
};
/* harmony default export */ const col = (__WEBPACK_EXTERNAL_MODULE_vue_defineComponent__({
  name: 'Col',
  props: colProps,
  emits: [],
  setup: function setup(props, ctx) {
    var _inject = __WEBPACK_EXTERNAL_MODULE_vue_inject__(containerKey),
      col = _inject.col,
      gutter = _inject.gutter,
      flex = _inject.flex;
    var span = props.span,
      offset = props.offset,
      pull = props.pull,
      push = props.push;
    var realSpan = __WEBPACK_EXTERNAL_MODULE_vue_computed__(function () {
      return span || col;
    });
    __WEBPACK_EXTERNAL_MODULE_vue_provide__('containerProps', {
      col: realSpan.value,
      gutter: gutter,
      flex: flex
    });
    var formatPercentage = function formatPercentage(val) {
      return "".concat(Number((val * 100).toFixed(3)), "%");
    };
    var style = __WEBPACK_EXTERNAL_MODULE_vue_computed__(function () {
      return {
        width: formatPercentage(realSpan.value / col),
        'padding-right': "".concat(gutter / 2, "px"),
        'padding-left': "".concat(gutter / 2, "px"),
        'margin-left': offset ? formatPercentage(offset / col) : null,
        right: pull ? formatPercentage(pull / col) : null,
        left: push ? formatPercentage(push / col) : null
      };
    });
    var _usePrefix = __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_config_provider_fe8577a3_usePrefix__(),
      resolveClassName = _usePrefix.resolveClassName;
    return function () {
      var _ctx$slots$default, _ctx$slots;
      return __WEBPACK_EXTERNAL_MODULE_vue_createVNode__("div", {
        "style": style.value,
        "class": "".concat(resolveClassName('grid-col'))
      }, [(_ctx$slots$default = (_ctx$slots = ctx.slots)["default"]) === null || _ctx$slots$default === void 0 ? void 0 : _ctx$slots$default.call(_ctx$slots)]);
    };
  }
}));
;// ../../packages/container/src/container.tsx
/*
 * Tencent is pleased to support the open source community by making
 * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
 *
 * Copyright (C) 2025 Tencent.  All rights reserved.
 *
 * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
 *
 * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
 *
 * ---------------------------------------------------
 * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
 * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
 * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
 * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
 * the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
 * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
 * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
 * IN THE SOFTWARE.
 */




var containerProps = {
  // 栅格数，默认 24
  col: __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_PropTypes__.number.def(24),
  // 栅格间距，单位 px，左右平分
  gutter: __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_PropTypes__.number.def(20),
  // 栅格容器的左右外边距
  margin: __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_PropTypes__.number.def(20),
  // 控制 row 是否使用 flex 布局
  flex: __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_PropTypes__.bool.def(false),
  // 外部设置的 class name
  extCls: __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_PropTypes__.string
};
/* harmony default export */ const container = (__WEBPACK_EXTERNAL_MODULE_vue_defineComponent__({
  name: 'Container',
  props: containerProps,
  emits: [],
  setup: function setup(props, ctx) {
    var col = props.col,
      gutter = props.gutter,
      flex = props.flex,
      extCls = props.extCls;
    __WEBPACK_EXTERNAL_MODULE_vue_provide__(containerKey, {
      col: col,
      gutter: gutter,
      flex: flex
    });
    var _usePrefix = __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_config_provider_fe8577a3_usePrefix__(),
      resolveClassName = _usePrefix.resolveClassName;
    var classes = __WEBPACK_EXTERNAL_MODULE_vue_computed__(function () {
      return extCls ? "".concat(resolveClassName('grid-container'), " ").concat(extCls) : "".concat(resolveClassName('grid-container'));
    });
    var style = __WEBPACK_EXTERNAL_MODULE_vue_computed__(function () {
      var margin = props.margin;
      return {
        'padding-right': "".concat(margin, "px"),
        'padding-left': "".concat(margin, "px")
      };
    });
    return function () {
      var _ctx$slots$default, _ctx$slots;
      return __WEBPACK_EXTERNAL_MODULE_vue_createVNode__("div", {
        "style": style.value,
        "class": classes.value
      }, [(_ctx$slots$default = (_ctx$slots = ctx.slots)["default"]) === null || _ctx$slots$default === void 0 ? void 0 : _ctx$slots$default.call(_ctx$slots)]);
    };
  }
}));
;// ../../node_modules/@babel/runtime/helpers/esm/typeof.js
function _typeof(o) {
  "@babel/helpers - typeof";

  return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
    return typeof o;
  } : function (o) {
    return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
  }, _typeof(o);
}

;// ../../node_modules/@babel/runtime/helpers/esm/toPrimitive.js

function toPrimitive(t, r) {
  if ("object" != _typeof(t) || !t) return t;
  var e = t[Symbol.toPrimitive];
  if (void 0 !== e) {
    var i = e.call(t, r || "default");
    if ("object" != _typeof(i)) return i;
    throw new TypeError("@@toPrimitive must return a primitive value.");
  }
  return ("string" === r ? String : Number)(t);
}

;// ../../node_modules/@babel/runtime/helpers/esm/toPropertyKey.js


function toPropertyKey(t) {
  var i = toPrimitive(t, "string");
  return "symbol" == _typeof(i) ? i : i + "";
}

;// ../../node_modules/@babel/runtime/helpers/esm/defineProperty.js

function _defineProperty(e, r, t) {
  return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
    value: t,
    enumerable: !0,
    configurable: !0,
    writable: !0
  }) : e[r] = t, e;
}

;// ../../packages/container/src/row.tsx


function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
/*
 * Tencent is pleased to support the open source community by making
 * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
 *
 * Copyright (C) 2025 Tencent.  All rights reserved.
 *
 * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
 *
 * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
 *
 * ---------------------------------------------------
 * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
 * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
 * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
 * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
 * the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
 * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
 * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
 * IN THE SOFTWARE.
 */



/* harmony default export */ const row = (__WEBPACK_EXTERNAL_MODULE_vue_defineComponent__({
  name: 'Row',
  emits: [],
  setup: function setup(_props, ctx) {
    var _inject = __WEBPACK_EXTERNAL_MODULE_vue_inject__(containerKey),
      col = _inject.col,
      gutter = _inject.gutter,
      flex = _inject.flex;
    __WEBPACK_EXTERNAL_MODULE_vue_provide__('containerProps', {
      col: col,
      gutter: gutter,
      flex: flex
    });
    var _usePrefix = __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_config_provider_fe8577a3_usePrefix__(),
      resolveClassName = _usePrefix.resolveClassName;
    var style = __WEBPACK_EXTERNAL_MODULE_vue_computed__(function () {
      var o = flex ? {
        display: ['-webkit-box', '-ms-flexbox', 'flex']
      } : {};
      return _objectSpread(_objectSpread({}, o), {}, {
        'margin-right': "-".concat(gutter / 2, "px"),
        'margin-left': "-".concat(gutter / 2, "px")
      });
    });
    return function () {
      var _ctx$slots$default, _ctx$slots;
      return __WEBPACK_EXTERNAL_MODULE_vue_createVNode__("div", {
        "style": style.value,
        "class": "".concat(resolveClassName('grid-row'))
      }, [(_ctx$slots$default = (_ctx$slots = ctx.slots)["default"]) === null || _ctx$slots$default === void 0 ? void 0 : _ctx$slots$default.call(_ctx$slots)]);
    };
  }
}));
;// ../../packages/container/src/index.ts
/*
 * Tencent is pleased to support the open source community by making
 * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
 *
 * Copyright (C) 2025 Tencent.  All rights reserved.
 *
 * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
 *
 * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
 *
 * ---------------------------------------------------
 * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
 * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
 * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
 * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
 * the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
 * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
 * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
 * IN THE SOFTWARE.
 */




var BkContainer = __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_withInstallProps__(container, {
  Row: row,
  Col: col
});
/* harmony default export */ const src = (BkContainer);

export { col as BkCol, BkContainer, row as BkRow, src as default };
