"use client"
import { Lock, Users, Globe } from "lucide-react"
import { useWizard, CATEGORY_OPTIONS } from "./wizard-context"
import { ChoiceCard } from "./primitives"
import { cn } from "@/lib/utils"
import type { Visibility } from "@/lib/ny-runde/types"
const VISIBILITY_CARDS: {
value: Visibility
title: string
description: string
icon: React.ReactNode
}[] = [
{
value: "private",
title: "Privat",
description: "Bare du kan se denne runden.",
icon: ,
},
{
value: "friends",
title: "Venner",
description: "Del med utvalgte kategorier av venner.",
icon: ,
},
{
value: "public",
title: "Offentlig",
description: "Kan ses av alle, også uten innlogging.",
icon: ,
},
]
export function Step5Sharing() {
const { state, patch } = useWizard()
function toggleCategory(code: string) {
const set = new Set(state.categories)
if (set.has(code)) set.delete(code)
else set.add(code)
patch({ categories: Array.from(set) })
}
const allCodes = CATEGORY_OPTIONS.map((c) => c.code)
const noneSelected = state.categories.length === 0
const allSelected = state.categories.length === allCodes.length
return (
{state.visibility === "friends" ? (
) : null}
)
}