<script>
import LastPacks from '@organisms/LastPacks/LastPacks.vue'
import {useStore} from 'vuex'
import ApiOfPacks from "@api/ApiOfPacks"
import ServiceOfPacks from "@services/ServiceOfPacks"

export default {
  name: 'LastPacksPage',
  components: {
    LastPacks
  },
  setup() {
    // const url = import.meta.env.VITE_API_ADDR
    const url = import.meta.env.VITE_SCAND_API_ADDR
    const store = useStore()
    
    const apiOfPacks = new ApiOfPacks(url)
    const serviceOfPacks = new ServiceOfPacks(apiOfPacks, store)

    return {serviceOfPacks}
  },
}

</script>

<template>
  <LastPacks :serviceOfPacks="serviceOfPacks" />
</template>
