<template>
  <div style="position: relative;height: 100%;width: 100%;">
    <MapShipList :data="data" ref="mapShipList" @handleOpenShipHistoricalTrack="handleOpenShipHistoricalTrack" />
    <MapShipHistoricalTrack ref="mapShipHistoricalTrack" @handleCloseShipHistoricalTrack="handleCloseShipHistoricalTrack" style="position: absolute;inset: 0;" v-if="showShipHistoricalTrack" />
  </div>
</template>

<script setup name="Map">
import MapShipList from "@/components/Map/ShipList/index";
import MapShipHistoricalTrack from "@/components/Map/ShipHistoricalTrack/index";
const { proxy } = getCurrentInstance(); // 获取实例中的proxy
const props = defineProps({
	data: {
		type: String,
		default: ""
	}
});

const { data } = toRefs(props);
const showShipHistoricalTrack = ref(false);

const handleOpenShipHistoricalTrack = () => {
  //// console.log(showShipHistoricalTrack.value)
  showShipHistoricalTrack.value = true;
};

const handleCloseShipHistoricalTrack = () => {
  //// console.log(showShipHistoricalTrack.value)
  showShipHistoricalTrack.value = false;
};

</script>

