
<view class="TUI-message-input-container">
 
  <view class="TUI-commom-function functionbox">
    <view class="more" bindtap="showTooltip">
      更多

    </view>
    <view class="contact" hidden="{{showTip}}" bindtap="orderMsg">
      联系客服 
    </view>
    <!-- <view class="TUI-commom-function-item" wx:for="{{commonFunction}}" wx:key="index" data-function="{{item}}" bindtap="handleCommonFunctions">{{item.name}}</view> -->
  </view>
  <view class="TUI-message-input">
   
   <image class="TUI-icon" bindtap="switchAudio" src="{{isAudio ? '../../../../static/assets/keyboard.svg' : '../../../../static/assets/audio.svg'}}" /> 
    <view wx:if="{{!isAudio || isEmoji}}" class="TUI-message-input-main {{ focus && 'TUI-message-input-main-focus'}}">
      <view class="textbox" hidden="{{hideText}}">
      
    </view>
      <textarea class="TUI-message-input-area" adjust-position="{{true}}" cursor-spacing="-300" placeholder="请输入文字" value="{{message}}" bindinput="onInputValueChange" maxlength="-1" type="text" auto-height="{{true}}" placeholder-class="textarea-placeholder" confirm-type="send" show-confirm-bar="{{false}}" 	disable-default-padding="{{true}}" bindfocus="inputBindFocus" bindblur="inputBindBlur" bindconfirm="sendTextMessage" />
    </view>
    <view wx:if="{{isAudio}}" class="TUI-message-input-main audio-main" bind:longpress="handleLongPress" bind:touchmove="handleTouchMove" bind:touchend="handleTouchEnd" style="display: flex; justify-content: center; font-size: 32rpx; font-family: PingFangSC-Regular; height: 30px">
      <text>{{text}}</text>
    </view>
    <view class="TUI-message-input-functions" hover-class="none" wx:if="{{!isAudio || isEmoji}}">
      <view class="TUI-sendMessage-btn">
        <image class="TUI-icon" bindtap="handleEmoji" src="../../../../static/images/emoji.png" />
      </view>
      <!-- <view wx:if="{{!sendMessageBtn}}" bindtap="handleExtensions" class="TUI-sendMessage-btn">
                <image class="TUI-icon" src="../../../../static/assets/more.svg" />
            </view>
            <view wx:else class="TUI-sendMessage-btn sendBtn" bindtap="sendTextMessage">
                发送
            </view> -->
      <view class="TUI-sendMessage-btn sendBtn" bindtap="sendTextMessage">
        发送
      </view>
    </view>
  </view>
  <view class="tool">
    <view class="toolcell" bindtap="handleSendPicture">
      <image class="toolicon"  src="../../../../static/images/camera.png" />
      <view class="name">相机</view>
    </view>
    <view class="toolcell" bindtap="handleSendImage">
      <image class="toolicon"  src="../../../../static/images/album.png" />
      <view class="name">相册</view>
    </view>
  </view>
  <view wx:if="{{displayFlag === 'emoji'}}" class="TUI-Emoji-area">
    <Emoji bind:enterEmoji="appendMessage" />
  </view>
  <view wx:if="{{displayFlag === 'extension'}}" class="TUI-Extensions">
    <view class="TUI-Extension-slot" bindtap="handleSendPicture">
      <image class="TUI-Extension-icon" src="../../../../static/assets/take-photo.svg" />
      <view class="TUI-Extension-slot-name">拍摄照片</view>
    </view>
    <view class="TUI-Extension-slot" bindtap="handleSendImage">
      <image class="TUI-Extension-icon" src="../../../../static/assets/send-img.svg" />
      <view class="TUI-Extension-slot-name">发送图片</view>
    </view>
    <view class="TUI-Extension-slot" bindtap="handleShootVideo">
      <image class="TUI-Extension-icon" src="../../../../static/assets/take-video.svg" />
      <view class="TUI-Extension-slot-name">拍摄视频</view>
    </view>
    <view class="TUI-Extension-slot" bindtap="handleSendVideo">
      <image class="TUI-Extension-icon" src="../../../../static/assets/send-video.svg" />
      <view class="TUI-Extension-slot-name">发送视频</view>
    </view>
    <view class="TUI-Extension-slot" data-value="{{1}}" bindtap="handleCheckAuthorize">
      <image class="TUI-Extension-icon" src="../../../../static/assets/audio-calling.svg" />
      <view class="TUI-Extension-slot-name">语音通话</view>
    </view>
    <view class="TUI-Extension-slot" data-value="{{2}}" bindtap="handleCheckAuthorize">
      <image class="TUI-Extension-icon" src="../../../../static/assets/video-calling.svg" />
      <view class="TUI-Extension-slot-name">视频通话</view>
    </view>
    <view class="TUI-Extension-slot" bindtap="handleServiceEvaluation">
      <image class="TUI-Extension-icon" src="../../../../static/assets/service-assess.svg" />
      <view class="TUI-Extension-slot-name">服务评价</view>
    </view>
    <view class="TUI-Extension-slot" bindtap="handleSendOrder">
      <image class="TUI-Extension-icon" src="../../../../static/assets/send-order.svg" />
      <view class="TUI-Extension-slot-name">发送订单</view>
    </view>
  </view>
  <CommonWords class="tui-cards" display="{{displayCommonWords}}" bind:sendMessage="$handleSendTextMessage" bind:close="$handleCloseCards" />
  <OrderList class="tui-cards" display="{{displayOrderList}}" bind:sendCustomMessage="$handleSendCustomMessage" bind:close="$handleCloseCards" />
  <ServiceEvaluation class="tui-cards" display="{{displayServiceEvaluation}}" bind:sendCustomMessage="$handleSendCustomMessage" bind:close="$handleCloseCards" />
</view>

<view class="record-modal" wx:if="{{popupToggle}}" bind:longpress="handleLongPress" bind:touchmove="handleTouchMove" bind:touchend="handleTouchEnd">
  <view class="wrapper">
    <view class="modal-loading">
    </view>
  </view>
  <view class="modal-title">
    {{title}}
  </view>
</view>
<van-dialog
  title="温馨提示"
  show="{{ showCustomer }}"
  message="立即联系客服"
  bind:confirm="confirmOrder"
  show-cancel-button
  confirm-button-color="#3CC7C0" 
  confirm-button-open-type="contact"
>
</van-dialog>
