<script setup>
const branchData = ref([])

const { data: branchRes } = await useMyFetch('/contact/getBranchList')

if (branchRes.value.code === 200) {
  branchData.value = branchRes.value.data
}

</script>

<template>
  <div class="toolbar">
    <div class="text">
      <div class="tTitle">{{ $t('branch') }}</div>
    </div>
  </div>
  <div class="content">
    <div>
      <div class="block" v-for="(item, index) in branchData" :key="index">
        <div class="row">
          <div class="col-12 col-lg-6">
            <div class="title">{{ item.name }}</div>
            <ul class="fa-ul">
              <li v-if="item.address"><i class="fa-solid fa-map-location-dot"></i> {{ item.address }}</li>
              <li v-if="item.tel"><i class="fa-solid fa-phone"></i> {{ item.tel }}</li>
              <li v-if="item.fax"><i class="fa-solid fa-fax"></i> {{ item.fax }}</li>
              <li v-if="item.email"><i class="fa-solid fa-envelope"></i> {{ item.email }}</li>
            </ul>
          </div>
          <div class="col-12 col-lg-6">
            <div class="imgCnt md" v-if="item.imageurl">
              <img :src="item.imageurl" alt="">
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<style lang="less"></style>
