<wxs src="../common/utils.wxs" module="_" />
<import src="../common/template/icon.wxml" />

<view
  class="{{className}} class {{prefix}}-class"
  style="{{_._style([tagStyle, style, customStyle])}}"
  bind:tap="handleClick"
>
  <view aria-hidden="{{true}}" class="{{classPrefix}}__icon">
    <template wx:if="{{_icon}}" is="icon" data="{{ tClass: prefix + '-icon', ..._icon }}" />
    <slot name="icon" />
  </view>
  <view class="{{classPrefix}}__text">
    <slot />
  </view>
  <t-icon
    wx:if="{{ closable }}"
    class="{{classPrefix}}__icon-close"
    t-class="{{prefix}}-icon"
    bind:tap="handleClose"
    name="close"
    aria-role="button"
    aria-label="关闭"
  />
</view>
