<template>
  <view :class="listClass" :style="stringifyStyle(rootStyle)">
    <view v-if="isRenderVisible($slots.title || title)" :class="bem.e('title')">
      <slot name="title">{{ title }}</slot>
    </view>
    <view :class="bem.e('content')">
      <slot></slot>
    </view>
    <view
      v-if="isRenderVisible($slots.description || description)"
      :class="bem.e('description')"
    >
      <slot name="description">{{ description }}</slot>
    </view>
  </view>
</template>

<script lang="ts">
import { defineComponent as _defineComponent } from "vue";
import { computed } from "vue";
import {
  classNames,
  stringifyStyle,
  isRenderVisible,
  createBem
} from "../utils";
import { listProps } from "./common";
const __default__ = {
  options: {
    virtualHost: true,
    styleIsolation: "shared"
  }
};
export default /* @__PURE__ */ _defineComponent({
  ...__default__,
  __name: "list",
  props: listProps,
  setup(__props, { expose: __expose }) {
    __expose();
    const props = __props;
    const bem = createBem("list");
    const listClass = computed(() => {
      return classNames(
        bem.b(),
        bem.m("card", props.card),
        bem.m("inlaid", props.inlaid),
        props.rootClass
      );
    });
    const __returned__ = { props, bem, listClass, get stringifyStyle() {
      return stringifyStyle;
    }, get isRenderVisible() {
      return isRenderVisible;
    } };
    return __returned__;
  }
});
</script>

<style lang="scss">
@use './index.scss';
</style>