<import-sjs
  from="./index.sjs"
  name="util" />

<view
  class="ant-selector {{ className ? className : '' }} {{ disabled ? 'ant-selector-disabled' : '' }}"
  style="{{ style }}">
  <view class="ant-selector-content-container">
    <block
      a:for="{{ options }}"
      a:for-index="index"
      a:for-item="item">
      <view
        class="ant-selector-content {{ options.length <= 2 ? 'ant-selector-content-item2' : '' }}">
        <view
          class="ant-selector-item {{ item.disabled ? 'ant-selector-item-disabled' : '' }} {{ util.getChecked(item.value, mixin.value, multiple) ? 'ant-selector-item-active ' + (activeItemClassName || '') : '' }}"
          style="{{ util.getChecked(item.value, mixin.value, multiple) ? activeItemStyle || '' : '' }}"
          data-value="{{ item.value }}"
          data-disabled="{{ item.disabled }}"
          onTap="onChange">
          <view
            a:if="{{ item.text }}"
            class="ant-selector-item-text">
            {{ item.text }}
          </view>
          <view
            a:if="{{ item.subText }}"
            class="ant-selector-item-subtext">
            {{ item.subText }}
          </view>
          <view
            a:if="{{ util.getChecked(item.value, mixin.value, multiple) }}"
            class="ant-selector-item-badge-active" />
        </view>
      </view>
    </block>
  </view>
</view>