<script setup>
const props = defineProps({
  params: Object
})

const locationIndicator = computed(() => {
  const shipName = props.params.data.partnerLocation?.Name || ''
  const shipAddress = props.params.data.partnerLocation?.C_Location_ID?.identifier || ''

  const billName = props.params.data.billPartnerLocation?.Name || ''
  const billAddress = props.params.data.billPartnerLocation?.C_Location_ID?.identifier || ''
  return (shipName == billName && shipAddress == billAddress) ? true : false
})
</script>

<template>
  <div class="d-inlineFlex items-center gap-5px mt-1">
    <span v-if="locationIndicator" title="Same Address" class="tf-icon ti ti-circle-check ti-md cursor-pointer" style="color: #00a500;"></span>
    <span v-else title="Different Address" class="tf-icon ti ti-alert-circle ti-md cursor-pointer" style="color: #dc3545;"></span>
  </div>
</template>