<wux-popup
    position="bottom"
    visible="{{ popupVisible }}"
    hasHeader="{{ false }}"
    hasFooter="{{ false }}"
    mountOnEnter="{{ false }}"
    safeArea="bottom"
    bind:show="onShow"
    bind:close="close"
    bind:closed="onClosed"
>
    <view class="{{ classes.wrap }}">
        <view class="{{ classes.toolbar }}" wx:if="{{ toolbar }}" catchtouchmove="noop">
            <view class="{{ classes.inner }}">
                <view class="{{ classes.cancel }}" hover-class="{{ classes.hover }}" bindtap="onCancel" wx:if="{{ toolbar.cancelText }}">{{ toolbar.cancelText }}</view>
                <view class="{{ classes.title }}">{{ toolbar.title }}</view>
                <view class="{{ classes.confirm }}" hover-class="{{ classes.hover }}" bindtap="onConfirm" wx:if="{{ toolbar.confirmText }}">{{ toolbar.confirmText }}</view>
            </view>
        </view>
        <wux-select-menu
            id="wux-select"
            value="{{ inputValue }}"
            options="{{ mergedOptions }}"
            iconPosition="{{ iconPosition }}"
            multiple="{{ multiple }}"
            max="{{ max }}"
            bind:selectChange="onSelectChange"
            wx:if="{{ !virtualized }}"
        />
        <wux-virtual-select-menu
            id="wux-select"
            value="{{ inputValue }}"
            options="{{ mergedOptions }}"
            iconPosition="{{ iconPosition }}"
            multiple="{{ multiple }}"
            max="{{ max }}"
            bind:selectChange="onSelectChange"
            wx:else
        />
        <view class="{{ prefixCls + '__prompt' }}" wx:if="{{ !mergedOptions || mergedOptions.length === 0 }}">
            <wux-prompt
                visible
                icon="{{ mergedNotFoundContent.icon }}"
                title="{{ mergedNotFoundContent.title }}"
                text="{{ mergedNotFoundContent.text }}"
                wrapStyle="{{ { backgroundColor: 'unset' } }}"
                wx:if="{{ mergedNotFoundContent }}"
            />
            <slot name="notFoundContent" wx:else></slot>
        </view>
    </view>
</wux-popup>
<slot></slot>
