"use client"; import { PaymentPlansResponseSchema, type PaymentPlansResponseData, } from "@/data/schemas/payment"; import { type Result as ResultT } from "@/utils/result"; import { SpAsyncUtil } from "@/utils/storage"; import { StorageKeys } from "../storage_keys"; export class PaymentPlansStorage { private constructor() {} static getPlans(): Promise> { return SpAsyncUtil.getJson( StorageKeys.paymentPlans, PaymentPlansResponseSchema, ); } static setPlans(plans: PaymentPlansResponseData): Promise> { return SpAsyncUtil.setJson( StorageKeys.paymentPlans, plans, PaymentPlansResponseSchema, ); } static clearPlans(): Promise> { return SpAsyncUtil.remove(StorageKeys.paymentPlans); } }