export default function useNFCPatrolSettings() {
  async function getBySite(site: string) {
    return useNuxtApp().$api<Record<string, any>>(
      `/api/nfc-patrol-settings/site/${site}`
    );
  }

  function updateBySite(site: string, value: any) {
    return useNuxtApp().$api(`/api/nfc-patrol-settings/site/${site}`, {
      method: "PUT",
      body: value,
    });
  }

  return {
    getBySite,
    updateBySite,
  };
}
