<template>
  <component :is="as" :class="[ui.base, ui.padding, ui.constrained]">
    <slot />
  </component>
</template>

<script>
import { computed, defineComponent } from "vue";
import { defu } from "defu";
import { useAppConfig } from "#imports";
import appConfig from "#build/app.config";
export default defineComponent({
  props: {
    as: {
      type: String,
      default: "div"
    },
    ui: {
      type: Object,
      default: () => appConfig.ui.container
    }
  },
  setup(props) {
    const appConfig2 = useAppConfig();
    const ui = computed(() => defu({}, props.ui, appConfig2.ui.container));
    return {
      // eslint-disable-next-line vue/no-dupe-keys
      ui
    };
  }
});
</script>
