<wxs
  src="./index.wxs"
  module="util"
></wxs>
<view
  class="ant-copilot-prompts {{className}}"
  style="{{style}}"
>
  <view
    wx:if="{{title}}"
    class="ant-copilot-prompts-title"
  >{{title}}</view>
  <view
    wx:if="{{vertical}}"
    class="ant-copilot-prompts-vertical-list"
  >
    <block
      wx:for="{{items}}"
      wx:for-index="index"
      wx:for-item="item"
    >
      <view
        class="ant-copilot-prompts-vertical-list-item {{item.disabled ? 'disabled' : ''}}"
        data-item="{{item}}"
        data-index="{{index}}"
        bindtap="onItemTap"
      >
        <ant-icon
          wx:if="{{!util.isUrl(item.icon)}}"
          type="{{item.icon}}"
          className="ant-copilot-prompts-vertical-list-item-icon"
        ></ant-icon>
        <image
          wx:else
          mode="scaleToFill"
          src="{{item.icon}}"
          class="ant-copilot-prompts-vertical-list-item-image"
        ></image>
        <text
          wx:if="{{item.label}}"
          class="ant-copilot-prompts-vertical-list-item-label"
        >{{item.label}}</text>
        <text
          wx:if="{{item.description}}"
          class="ant-copilot-prompts-vertical-list-item-description"
        >{{item.description}}</text>
        <ant-icon
          wx:if="{{item.showArrow}}"
          type="RightOutline"
          class="ant-copilot-prompts-vertical-list-item-arrow"
        ></ant-icon>
      </view>
    </block>
  </view>
  <scroll-view
    wx:else
    scrollX="{{!wrap}}"
    enableFlex="true"
    class="ant-copilot-prompts-horizontal-list {{wrap ? 'wrap' : ''}}"
  >
    <view
      class="ant-copilot-prompts-horizontal-list-item {{item.disabled ? 'disabled' : ''}}"
      wx:for="{{items}}"
      wx:for-index="index"
      wx:for-item="item"
    >
      <ant-typography
        className="ant-copilot-prompts-horizontal-list-item-typography"
        iconPosition="left"
        icon="{{item.icon}}"
        data-item="{{item}}"
        data-index="{{index}}"
        bindtap="onItemTap"
      >{{item.label}}</ant-typography>
    </view>
  </scroll-view>
</view>