/**
 * tdesign v0.39.1-alpha.1
 * (c) 2022 tdesign
 * @license MIT
 */

'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

var _defineProperty = require('@babel/runtime/helpers/defineProperty');
var Vue = require('vue');
var config = require('../config.js');
var utils_renderTnode = require('../utils/render-tnode.js');
require('@babel/runtime/helpers/typeof');
require('lodash/isObject');

function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }

var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty);
var Vue__default = /*#__PURE__*/_interopDefaultLegacy(Vue);

var name = "".concat(config.prefix, "-layout");
var _Layout = Vue__default["default"].extend({
  name: "TLayout",
  data: function data() {
    return {
      hasSider: false
    };
  },
  provide: function provide() {
    return {
      layout: this
    };
  },
  methods: {
    renderContent: function renderContent() {
      return this.$scopedSlots["default"] ? this.$scopedSlots["default"](null) : "";
    }
  },
  computed: {
    classes: function classes() {
      return [name, _defineProperty__default["default"]({}, "".concat(name, "--with-sider"), this.hasSider)];
    }
  },
  render: function render() {
    var h = arguments[0];
    return h("section", {
      "class": this.classes
    }, [utils_renderTnode.renderTNodeJSX(this, "default")]);
  }
});

exports["default"] = _Layout;
//# sourceMappingURL=layout.js.map
