import type { Shop } from "@/lib/types" export function resolveOwnerShop(userId: string | undefined, shops: Shop[]): Shop | null { if (!userId) return null return shops.find((shop) => shop.owner.id === userId) ?? null }