Dominik Milacher 0dc24c4db7
Some checks failed
Build and deploy updated apps / Build & deploy (push) Failing after 50s
Extend ux layer and overhaul panoramablick-saalbach.at
2025-11-21 21:17:52 +01:00

38 lines
846 B
Vue

<script setup lang="ts">
const config = useContentConfig()
const { preferVariant } = useContentPreference()
const { variant, path } = useContentInjected()
const variants = config.variant?.list ?? []
const candidates = computed(() => variants.filter((v) => v.code !== variant.value))
const props = defineProps<{
class?: string
ux?: any
}>()
const classes = useStyling(
'contentVariantSwitcher',
{
slots: {
base: '',
},
},
props
)
</script>
<template>
<ULink
v-for="candidate in candidates"
:key="candidate.code"
:class="classes.base"
:to="{ path: path(undefined, { variant: candidate.code }).value, query: { freeze: 'true' } }"
class="flex items-center justify-center"
:active="false"
@click="preferVariant(candidate.code)"
>
<Icon :name="candidate.icon" />
</ULink>
</template>