// External Supabase browser client (user's own Supabase project).
// URL + anon key are PUBLIC by design (RLS protects data).
import { createClient } from "@supabase/supabase-js";

const SUPABASE_URL = "https://bcuhviyohexxcgbyratc.supabase.co";
const SUPABASE_ANON_KEY = "sb_publishable_LPzaAhfgskFIgIUjGt85vw_v3Rr3GhS";

export const supabaseExt = createClient(SUPABASE_URL, SUPABASE_ANON_KEY, {
  auth: {
    storage: typeof window !== "undefined" ? localStorage : undefined,
    persistSession: true,
    autoRefreshToken: true,
    storageKey: "ext-supabase-auth",
  },
});

export const EXTERNAL_SUPABASE_URL = SUPABASE_URL;
export const EXTERNAL_SUPABASE_ANON_KEY = SUPABASE_ANON_KEY;