<template>
  <div class="setting-form-item">
    <div class="item-main">
      <div class="item-main-label">
        <span class="text-[32rpx] font-regular">{{ item.label }}</span>
      </div>
      <div class="item-main-value">
        <span class="text-[32rpx] font-regular" v-if="item.value">
          {{ item.value }}
        </span>
        <img
          v-if="item.hasPointer"
          src="/src/static/image/chatSettings/pointer.png"
        />
        <tm-switch
          v-if="item.customInfo && item.customInfo === 'switch'"
          barIcon=""
          color="#46299D"
          unCheckedColor="#EEEEEE"
        ></tm-switch>
      </div>
    </div>
    <div class="item-sub" v-if="item.subValue">
      <span class="text-[32rpx] font-regular">{{ item.subValue }}</span>
    </div>
  </div>
</template>
<script setup>
import { defineProps } from 'vue'
const props = defineProps({
  item: {
    type: Object,
    default() {
      return {}
    },
  },
})
</script>
<style lang="scss" scoped>
.setting-form-item {
  .item-main {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    .item-main-label {
      span {
        line-height: 44rpx;
        color: $theme-text;
      }
    }
    .item-main-value {
      span {
        line-height: 44rpx;
        color: #747474;
      }
      img {
        width: 11rpx;
        height: 18rpx;
        margin: 0 0 0 32rpx;
      }
    }
  }

  .item-sub {
    margin: 28rpx 0 0;
    span {
      line-height: 44rpx;
      color: #747474;
    }
  }
}
</style>
