"use client" import { useWrStore } from "@/app/store"; import { btnClass } from "@/app/store/common/code"; import React, { useCallback, useEffect, useRef, useState } from 'react'; import { MapSearchBar, type ReturnType } from "./mapSearchBar"; import { Button } from "@common/components/ui"; import { SearchFormLeft, type EnvPartSelectDataType } from "@common/business_components/ui/search_form_left"; import { SearchFormRight } from "@common/business_components/ui/search_form_right"; import type { SelectDataType } from "@common/business_components/ui/search_input_select"; const API_URL = `${process.env.NEXT_PUBLIC_SEWERAGE_API_URL}`; const YEARS = Array.from({ length: 100 }, (_, i) => `${2025 - i}`); interface SearchModalProps { open: boolean; onOpenChange: (open: boolean) => void; onFeatureSelect: (row: any) => void; } // 날짜 조합 함수 const getDateString = ( year: string, month: string, day: string, defaultDate: string, ) => { if (!year && !month && !day) return defaultDate; const y = year || defaultDate.slice(0, 4); const m = month || defaultDate.slice(4, 6); const d = day || defaultDate.slice(6, 8); return `${y}${m}${d}`; }; const SearchModal: React.FC = ({ open, onOpenChange, onFeatureSelect, }) => { // 로딩바 const [isLoading, setIsLoading] = useState(false); // 상세 정보 조회를 위한 상태 추가 const [popupFeature, setPopupFeature] = useState(null); const { code, pbnstSttn, pbnstSttnSearch } = useWrStore((state) => state); const [isChHead, setIsChHead] = useState(false); const ref = useRef({} as ReturnType); return (
); }; export default React.memo(SearchModal);