/**
 * title: Checked Toggle
 * description: Apply the checked attribute to the toggle component to activate the selection by default.
 * height: 100
 */
import { component$, useSignal } from '@builder.io/qwik'
import { StaticGenerateHandler } from '@builder.io/qwik-city'
import { Toggle } from 'flowbite-qwik'
import { staticGenerateHandler } from '~/routes/examples/layout'

export default component$(() => {
  const checkedToggleValue = useSignal(true)

  return (
    <div class="flex flex-wrap gap-2 p-6">
      <Toggle label="Toggle me" bind:checked={checkedToggleValue} />
    </div>
  )
})

export const onStaticGenerate: StaticGenerateHandler = async () => {
  return staticGenerateHandler()
}
