<script lang="ts" setup>
import PhotoCalendar from '@/pages/tsp-photo/PhotoCalendar.vue'
import PhotoList from '@/pages/tsp-photo/PhotoList.vue'

const tspPhotoData = ref<TspPhotoTypes.TspPhotoSearchParam>({})
const photoCalendar = ref<InstanceType<typeof PhotoCalendar> | null>(null)

function refresh() {
  photoCalendar.value?.refresh()
}
</script>

<template>
  <div class="tsp-photo-wrapper">
    <PhotoCalendar ref="photoCalendar" v-model:tspPhotoData="tspPhotoData" status="edit"/>
    <PhotoList :pointName="tspPhotoData.pointName" :tspId="tspPhotoData.tspId"
        :uploadDate="tspPhotoData.uploadDate" status="edit" @refresh="refresh"/>
  </div>
</template>

<style lang="stylus" scoped>
.tsp-photo-wrapper {
  height: 100%
  width: 100%
  display flex
}
</style>
