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

<script>
import TYPE from '@/const/type';

export default {
  name: 'EventsListToolbar',

  data() {
    return {
      fields: [
        {
          type: 'SceneSelect',
          name: 'kindergartenId',
          label: '所属场景'
        },
        {
          type: 'text',
          name: 'name',
          label: '活动名称'
        },
        {
          type: 'select',
          name: 'isShow',
          label: '状态',
          options: TYPE,
          format: val => (val !== null && val !== '' ? !!val : null)
        },
        {
          type: 'dateArray',
          name: 'date',
          label: '活动开始时间',
          apiName: ['startTime', 'endTime'],
          labelWidth: '100px'
        }
      ]
    };
  }
};
</script>

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