import { ref } from 'vue'
import PageContent from '@/components/page-content'

export function usePageSearch() {
  const pageContentRef = ref(PageContent)
  const handleResetClick = () => {
    pageContentRef.value?.getPageData()
    
  }
  const handleQueryClick = (queryInfo) => {
    console.log(queryInfo, 'queryInfo')
    pageContentRef.value?.getPageData(queryInfo)
    return queryInfo
  }
  return [pageContentRef, handleResetClick, handleQueryClick]
}
