<wxs
  src="../../_util/isPropsEmpty.wxs"
  module="u"
></wxs>
<template
  name="selector"
  data="{{$id}}"
>
  <view
    class="ant-range-picker-selector-item {{active ? 'ant-range-picker-selector-item-active' : ''}}"
    bindtap="onChangeCurrentPickerType"
    data-type="{{type}}"
  >
    <view
      wx:if="{{value}}"
      class="ant-range-picker-selector-item-value"
    >{{value}}</view>
    <view
      wx:else
      class="ant-range-picker-selector-item-placeholder"
    >{{placeholder}}</view>
    <ant-icon
      wx:if="{{precision === 'year' || precision === 'month' || precision === 'day' || precision === 'hour'}}"
      type="CalendarOutline"
      className="ant-range-picker-selector-item-icon"
    ></ant-icon>
  </view>
</template>
<ant-picker
  formattedValueText="{{formattedValueText}}"
  className="ant-range-picker {{className || ''}}"
  popClassName="{{!currentStartDate || !currentEndDate ? 'ant-range-picker-confirm-disabled' : ''}} {{popClassName || ''}}"
  visible="{{visible}}"
  style="{{style}}"
  animationType="{{animationType}}"
  options="{{columns}}"
  value="{{currentValue}}"
  disabled="{{disabled}}"
  readonly="{{readonly}}"
  title="{{title}}"
  placeholder="{{placeholder}}"
  okText="{{okText}}"
  cancelText="{{cancelText}}"
  maskStyle="{{maskStyle}}"
  maskClassName="{{maskClassName}}"
  indicatorStyle="{{indicatorStyle}}"
  indicatorClassName="{{indicatorClassName}}"
  bindchange="onChange"
  bindcancel="onCancel"
  bindok="onOk"
  bindvisiblechange="onVisibleChange"
  maskClosable="{{maskClosable}}"
>
  <view
    class="ant-range-picker-selector"
    slot="content-header"
  >
    <template
      is="selector"
      data="{{ placeholder: u.isPropsEmpty(startPlaceholder) ? locale.RangePicker.startPlaceholder : startPlaceholder, active: pickerType === 'start', type: 'start', value: currentStartValueStr, precision: precision, $id }}"
    ></template>
    <view class="ant-range-picker-selector-split">{{splitCharacter}}</view>
    <template
      is="selector"
      data="{{ placeholder: u.isPropsEmpty(endPlaceholder) ? locale.RangePicker.endPlaceholder : endPlaceholder, active: pickerType === 'end', type: 'end', value: currentEndValueStr, precision: precision, $id }}"
    ></template>
  </view>
  <slot
    name="content"
    slot="content"
  ></slot>
  <slot
    name="title"
    slot="title"
  ></slot>
  <slot
    name="prefix"
    slot="prefix"
  ></slot>
  <slot
    name="suffix"
    slot="suffix"
  ></slot>
</ant-picker>