Files
web-temp/layers/stores/useCallerInfoStore.ts
2025-09-09 03:34:09 +00:00

34 lines
743 B
TypeScript

export const useCallerInfoStore = defineStore("callerInfoStore", () => {
const callerId = ref<string>("");
const callerDetail = ref<string>("");
const setCallerId = (id: string): void => {
callerId.value = id;
};
const setCallerDetail = (detail: string): void => {
callerDetail.value = detail;
};
// 초기화
const resetCallerInfo = (): void => {
callerId.value = "";
callerDetail.value = "";
};
// 현재 정보 반환
const getCallerInfo = (): { callerId: string; callerDetail: string } => ({
callerId: callerId.value,
callerDetail: callerDetail.value,
});
return {
callerId,
callerDetail,
setCallerId,
setCallerDetail,
resetCallerInfo,
getCallerInfo,
};
});