<template>
  <toolbar-container :fields="fields" v-on="$listeners" />
</template>

<script>
import AUDITTYPE from '@/const/auditType';
import { setStatus } from '@/utils';

export default {
  name: 'ImageGoodsManagementToolbar',

  data() {
    return {
      fields: [
        {
          type: 'SceneSelect',
          name: 'kindergartenId',
          label: '场景'
        },
        {
          type: 'ActivitySelect',
          name: 'activityId',
          label: '活动'
        },
        {
          type: 'dateArray',
          name: 'date',
          label: '上传时间',
          apiName: ['startTime', 'endTime']
        },
        {
          type: 'select',
          name: 'isTake',
          label: '随手拍',
          options: setStatus(['是', '否'], [true, false]),
          format: val => (val !== null && val !== '' ? !!val : null)
        },
        {
          type: 'select',
          name: 'isBeautiful',
          label: '精选',
          options: setStatus(['是', '否'], [true, false]),
          format: val => (val !== null && val !== '' ? !!val : null)
        },
        {
          type: 'select',
          name: 'isReady',
          label: '裂变',
          options: setStatus(['是', '否'], [true, false]),
          format: val => (val !== null && val !== '' ? !!val : null)
        }
      ]
    };
  }
};
</script>

<style type="scss" scoped></style>
