<%_ if (position === 'import') { _%>
import { ReceiverType } from '@/models/enumerations/receiver-type.model';
<%_ } _%>

<%_ if (position === 'method') { _%>
  get receiveComponentProps() {
    const result: any = {
      show: false,
      props: {
        mode: 'multiple',
        valueField: 'id',
        labelField: '',
      },
      optionProps: {
        value: 'id',
        label: ''
      }
    };
    switch (this.announcement.receiverType) {
      case ReceiverType.ALL:
        result.show = false;
        result.selectListName = '';
        break;
      case ReceiverType.AUTHORITY:
        result.show = true;
        result.selectListName = 'jhi-authority-compact';
        result.props.labelField = 'name';
        result.optionProps.label = 'name';
        break;
      case ReceiverType.DEPARTMENT:
        result.show = true;
        result.selectListName = 'jhi-department-compact';
        result.props.labelField = 'name';
        result.optionProps.label = 'name';
        break;
      case ReceiverType.USER:
        result.show = true;
        result.selectListName = 'jhi-user-compact';
        result.props.labelField = 'firstName';
        result.optionProps.label = 'firstName';
        break;
      case ReceiverType.POSITION:
        result.show = true;
        result.selectListName = 'jhi-position-compact';
        result.props.labelField = 'name';
        result.optionProps.label = 'name';
        break;
      default:
        result.show = false;
        result.selectListName = '';
    }
    return result;
  }
<%_ } _%>

<%_ if (position === 'vue') { _%>
        <a-col :span="8" v-if="receiveComponentProps.show">
          <a-form-item :label="$t('testjeecg18App.announcement.userIds')" :label-col="{ span: 8 }" :wrapper-col="{ span: 16 }">
            <select-list-modal :selectListName="receiveComponentProps.selectListName"
                               :props="receiveComponentProps.props"
                               :option-props="receiveComponentProps.optionProps"
                               v-model="$v.announcement.userIds.$model" id="announcement-userIds" name="userIds"></select-list-modal>
          </a-form-item>
        </a-col>
<%_ } _%>
