<template>
  <div class="summary-cart-item">
    <img
      class="summary-cart-item__image"
      :src="productsData?.images[0]?.src"
      alt="cart?.image"
    >

    <div class="summary-cart-item__attributes">
      {{ size }}
    </div>
  </div>
</template>

<script setup lang="ts">
const props = defineProps({
  summaryCartItem: {
    type: String,
    required: true,
  },
})

const { productsData, size } = useProduct(props?.summaryCartItem?.variation_id)
</script>

<style lang="scss">
.summary-cart-item {
  max-width: 600px;
  display: flex;
  flex-direction: column;
  gap: 4px;

  &__image {
    width: 120px;
  }

  &__attributes {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
  }
}
</style>
