<script setup lang="ts">
import { useLoadQuerys } from '@/components/composeabe/LoadQuerys';
import { useGetCurrentLocation } from '../composeabe/GetCurrentLocation';
import AppCofig from '@/common/config/AppCofig';
import LightMap from '../components/LightMap.vue';

const { querys } = useLoadQuerys({
  latitude: AppCofig.defaultLonLat[1],
  longitude: AppCofig.defaultLonLat[0],
  city: ''
}, async (querys) => {
  currentLocation.setCurrentLocationWithCity(querys.city);
});

const currentLocation = useGetCurrentLocation({
  onCityChanged: (city) => {},
});

</script>

<template>
  <LightMap 
    full
    :city="querys.city"
    :lonlat="currentLocation.currentLonlat.value"
    :isLightMode="true" 
    @getCurrentLonlat="currentLocation.getCurrentExactLocation"
  />
</template>