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,
  };
});
