import { createStore } from "zustand/vanilla"; import { codeActionExport, comCodeStateExport, getCityCd, getEnvPartCd, getMiddleRegionCd, getRegionCd, getSggCd, getUnitWaterShedCd, type comCodeState, type comCodeType, } from "./common/code"; import { comFcltSearchAction, comFcltStateExport, type comFcltState, type comFcltType, } from "./common/searchCode"; import { matDmdActionsExport, matDmdStateExport, type matDmdState, type matDmdType, } from "./matDmd"; import { coRvwActionsExport, coRvwStateExport, type coRvwState, type coRvwType, } from "./matDmd/coMatRvw"; import { coSttnActionsExport, coSttnStateExport, type coSttnState, type coSttnType, } from "./matDmd/coSttn"; // 옮겨야함 import { drgtActionsExport, drgtStateExport, type drgtState, type drgtType, } from "./matDmd/drgtSttn"; import { ldrmntActionsExport, ldrmntStateExport, type ldrmntState, type ldrmntType, } from "./matDmd/ldrmntCoSttn"; import { ruseCaseActionsExport, ruseCaseStateExport, type ruseCaseState, type ruseCaseType, } from "./matDmd/ruseCaseMng"; import { ruseHstryActionsExport, ruseHstryStateExport, type ruseHstryState, type ruseHstryType, } from "./matDmd/ruseRvwHstry"; import { rainChkgdnActionsExport, rainChkgdnStateExport, type rainChkgdnState, type rainChkgdnType, } from "./prfmncReg/chkgdnReg/rainChkgdn"; import { rswtChkgdnActionsExport, rswtChkgdnStateExport, type rswtChkgdnState, type rswtChkgdnType, } from "./prfmncReg/chkgdnReg/rswrtChkgdn"; import { pbnstPrfmncActionsExport, pbnstPrfmncStateExport, type pbnstPrfmncState, type pbnstPrfmncType, } from "./prfmncReg/pbnstPrfmncReg"; import { rainChkSttnActionsExport, rainChkSttnStateExport, type rainChkSttnState, type rainChkSttnType, } from "./prfmncSttn/chkgdnSttn/rainChkgdnSttn"; import { rswtChkStateExport, rswtChkSttnActionsExport, type rswtChkSttnState, type rswtChkSttnType, } from "./prfmncSttn/chkgdnSttn/rswtChkgdnSttn"; import { pbnstPrfmncSttnActionsExport, pbnstPrfmncSttnExport, type pbnstPrfmncSttnState, type pbnstPrfmncSttnType, } from "./prfmncSttn/pbnstPrfmncSttn"; import { bdstActionsExport, bdstStateExport, type bdstFulType, type bdstState, } from "./ruseFcltMng/fcltReg/bdstReg"; import { htdflFacActionsExport, htdflFacStateExport, type htdflFacState, type htdflFacType, } from "./ruseFcltMng/fcltReg/htdflReg"; import { pubFacActionsExport, pubFacStateExport, type pubFacState, type pubFacType, } from "./ruseFcltMng/fcltReg/pbnstReg"; import { rainFacActionsExport, rainFacStateExport, type rainFacState, type rainFacType, } from "./ruseFcltMng/fcltReg/rainReg"; import { rswtFacActionsExport, rswtFacStateExport, type rswtFacState, type rswtFacType, } from "./ruseFcltMng/fcltReg/rswtReg"; import { htdflSttnActionsExport, htdflSttnStateExport, type htdflSttnState, type htdflSttnType, } from "./ruseFcltMng/fcltSttn/htdflSttn"; import { pbnstSttnActionsExport, pbnstSttnStateExport, type pbnstSttnState, type pbnstSttnType, } from "./ruseFcltMng/fcltSttn/pbnstSttn"; import { rainSttnActionsExport, rainSttnStateExport, type rainSttnState, type rainSttnType, } from "./ruseFcltMng/fcltSttn/rainSttn"; import { rswtSttnActionsExport, rswtSttnStateExport, type rswtSttnState, type rswtSttnType, } from "./ruseFcltMng/fcltSttn/rswtSttn"; import { rainStatActionsExport, rainStatExport, type rainStatState, type rainStatType, } from "./stats/rainStat"; import { rswtStatActionsExport, rswtStatExport, type rswtStatState, type rswtStatType, } from "./stats/rswtStat"; import { LoginApi } from "@/src/entities/auth"; import { authActionsExport, authStateExport, type authState, type authType, } from "./common/auth"; import { pbnMapActionsExport, pbnMapStateExport, type pbnMapState, type pbnMapType, } from "./map/pbnstMap"; import { comMapStateExport, commonMapActionsExport, type comMapState, type comMapType, } from "./map/common"; import { rainMapActionsExport, rainMapStateExport, type rainMapState, type rainMapType, } from "./map/rainMap"; import { rswtMapActionsExport, rswtMapStateExport, type rswtMapState, type rswtMapType, } from "./map/rswtMap"; import { htdfMapActionsExport, htdfMapStateExport, type htdfMapState, type htdfMapType, } from "./map/htdflMap"; import { ruseMapActionsExport, ruseMapStateExport, type ruseMapState, type ruseMapType, } from "./map/ruseMap"; import { coSttnMapActionsExport, coSttnMapStateExport, type coSttnMapState, type coSttnMapType, } from "./map/coSttnMap"; import { ldrmntMapActionsExport, ldrmntMapStateExport, type ldrmntMapState, type ldrmntMapType, } from "./map/ldrmntCoMap"; export type WrStore = comCodeType & pubFacType & rainFacType & rswtFacType & matDmdType & htdflFacType & bdstFulType & rainChkgdnType & rswtChkgdnType & rainSttnType & rswtSttnType & htdflSttnType & rainChkSttnType & rswtChkSttnType & pbnstSttnType & coSttnType & // 옮겨야함 ldrmntType & // 옮겨야함 pbnstPrfmncType & coRvwType & ruseHstryType & pbnstPrfmncSttnType & drgtType & ruseCaseType & rainStatType & rswtStatType & comFcltType & pbnMapType & comMapType & rainMapType & rswtMapType & htdfMapType & ruseMapType & coSttnMapType & ldrmntMapType & authType; export const StoreZus = ( initState: comCodeState & rainFacState & pubFacState & rswtFacState & matDmdState & htdflFacState & bdstState & rainChkgdnState & rswtChkgdnState & rainSttnState & rswtSttnState & htdflSttnState & rainChkSttnState & comFcltState & rswtChkSttnState & pbnstSttnState & coSttnState & // 옮겨야함 ldrmntState & // 옮겨야함 pbnstPrfmncState & coRvwState & ruseHstryState & pbnstPrfmncSttnState & drgtState & ruseCaseState & rainStatState & rswtStatState & pbnMapState & comMapState & rainMapState & rswtMapState & htdfMapState & ruseMapState & coSttnMapState & ldrmntMapState & authState = { ...comCodeStateExport, ...pubFacStateExport, ...rainFacStateExport, ...rswtFacStateExport, ...matDmdStateExport, ...htdflFacStateExport, ...bdstStateExport, ...rainChkgdnStateExport, ...rswtChkgdnStateExport, ...rainSttnStateExport, ...rswtSttnStateExport, ...htdflSttnStateExport, ...rainChkSttnStateExport, ...rswtChkStateExport, ...pbnstSttnStateExport, ...coSttnStateExport, ...ldrmntStateExport, ...pbnstPrfmncStateExport, ...coRvwStateExport, ...ruseHstryStateExport, ...pbnstPrfmncSttnExport, ...drgtStateExport, ...ruseCaseStateExport, ...rainStatExport, ...rswtStatExport, ...comFcltStateExport, ...pbnMapStateExport, ...comMapStateExport, ...authStateExport, ...rainMapStateExport, ...rswtMapStateExport, ...htdfMapStateExport, ...ruseMapStateExport, ...coSttnMapStateExport, ...ldrmntMapStateExport, } ) => { return createStore()((set) => { getSggCd(set); getCityCd(set); getRegionCd(set); getMiddleRegionCd(set); getUnitWaterShedCd(set); getEnvPartCd(set); LoginApi.login({ userId: "CLEANWATER", password: "gktneh12!@" }); return { ...initState, ...comFcltSearchAction(set), ...pubFacActionsExport(set), ...rainFacActionsExport(set), ...rswtFacActionsExport(set), ...matDmdActionsExport(set), ...htdflFacActionsExport(set), ...codeActionExport(set), ...bdstActionsExport(set), ...rainChkgdnActionsExport(set), ...rswtChkgdnActionsExport(set), ...rainSttnActionsExport(set), ...rswtSttnActionsExport(set), ...htdflSttnActionsExport(set), ...rainChkSttnActionsExport(set), ...rswtChkSttnActionsExport(set), ...pbnstSttnActionsExport(set), ...coSttnActionsExport(set), // 옮겨야함 ...ldrmntActionsExport(set), // 옮겨야함 ...pbnstPrfmncActionsExport(set), ...coRvwActionsExport(set), ...ruseHstryActionsExport(set), ...pbnstPrfmncSttnActionsExport(set), ...drgtActionsExport(set), ...ruseCaseActionsExport(set), ...rainStatActionsExport(set), ...rswtStatActionsExport(set), ...authActionsExport(set), ...commonMapActionsExport(set), ...pbnMapActionsExport(set), ...rainMapActionsExport(set), ...rswtMapActionsExport(set), ...htdfMapActionsExport(set), ...ruseMapActionsExport(set), ...coSttnMapActionsExport(set), ...ldrmntMapActionsExport(set), }; }); }; //store 등록하는 부분