<template>
  <view class="container">
    <view class="card hero">
      <view class="name">{{ store.name }}</view>
      <view class="muted sub">{{ store.address }}</view>
      <view class="row between meta">
        <view class="tag">营业 {{ store.openHours }}</view>
        <view class="tag" @tap="call">电话</view>
      </view>
    </view>

    <view class="card block">
      <view class="title">门店信息</view>
      <view class="line row between">
        <view class="muted">地址</view>
        <view class="val" @tap="copy(store.address)">复制</view>
      </view>
      <view class="muted tip">{{ store.address }}</view>
      <view class="line row between">
        <view class="muted">电话</view>
        <view class="val" @tap="call">{{ store.phone }}</view>
      </view>
      <view class="line row between">
        <view class="muted">营业时间</view>
        <view class="val">{{ store.openHours }}</view>
      </view>
    </view>

    <view class="card block">
      <view class="title">技师团队</view>
      <view class="tech" v-for="t in techs" :key="t.id">
        <view class="row between">
          <view>
            <view class="tname">{{ t.name }}</view>
            <view class="muted tsub">{{ t.title }}</view>
          </view>
          <view class="tags">
            <text class="tag2" v-for="g in t.tags" :key="g">{{ g }}</text>
          </view>
        </view>
      </view>
    </view>

    <AiFloat />
  </view>
</template>

<script>
import AiFloat from '@/components/AiFloat.vue'
import { storeProfile, technicians } from '@/common/mockData'

export default {
  components: { AiFloat },
  data() {
    return {
      store: storeProfile,
      techs: technicians
    }
  },
  methods: {
    call() {
      uni.makePhoneCall({ phoneNumber: this.store.phone })
    },
    copy(text) {
      uni.setClipboardData({ data: text })
    }
  }
}
</script>

<style lang="scss" scoped>
.hero {
  padding: 26rpx;
}
.name {
  font-size: 42rpx;
  font-weight: 950;
}
.sub {
  margin-top: 12rpx;
  font-size: 26rpx;
}
.meta {
  margin-top: 18rpx;
}
.block {
  margin-top: 18rpx;
  padding: 22rpx;
}
.title {
  font-weight: 950;
  font-size: 30rpx;
  margin-bottom: 14rpx;
}
.line {
  padding: 12rpx 0;
}
.val {
  color: #1d4ed8;
  font-weight: 900;
}
.tip {
  font-size: 26rpx;
  line-height: 1.6;
}
.tech {
  padding: 16rpx 0;
  border-top: 1rpx solid rgba(17, 24, 39, 0.08);
}
.tech:first-of-type {
  border-top: 0;
}
.tname {
  font-size: 30rpx;
  font-weight: 950;
}
.tsub {
  margin-top: 6rpx;
  font-size: 24rpx;
}
.tags {
  display: flex;
  gap: 8rpx;
  flex-wrap: wrap;
  justify-content: flex-end;
  max-width: 280rpx;
}
.tag2 {
  padding: 10rpx 14rpx;
  border-radius: 999rpx;
  font-size: 24rpx;
  background: rgba(17, 24, 39, 0.06);
}
</style>

