<template>
  <widget-wrapper v-bind="$props">
    <q-card :flat="flat" slot-scope="{ model, schema, value }">
      <q-card-section v-if="schema.title">
        {{ schema.title }}
      </q-card-section>
      <q-card-actions>
        <div class="row gutter-x-sm">
          <slot />
        </div>
      </q-card-actions>
    </q-card>
  </widget-wrapper>
</template>

<script lang="ts">
import { WidgetWrapper } from '@devsun/form-generator/dist';
import { Component, Prop, Vue } from 'vue-property-decorator';

@Component({
  components: {
    WidgetWrapper,
  },
})
export default class Card extends Vue {
  @Prop() private model: any;
  @Prop() private schema: any;
  @Prop() private value: any;

  @Prop() private flat: boolean;
}
</script>

<style scoped></style>
