
        <script setup>
        import { computed } from "vue"
        import { Example, PropsTable, PageTitle } from "@viteplay/vue"
        import { useRoute, useRouter } from "vue-router"
            
        let componentProps = {"CRadio":[{"name":"modelValue","type":"string","required":false,"desc":"@example modelValue: ''"},{"name":"p_Label","type":"string","required":false,"desc":"*radioの項目に表示するテキスト\n@example p_Label: 'text'"},{"name":"p_Name","type":"string","required":false,"desc":"@example p_Label: 'testRadio'\n!必須 required"},{"name":"value","type":"string","required":false,"desc":"*radioの項目に表示するテキスト\n@example p_Label: 'text'"},{"name":"disabled","type":"boolean","required":false,"desc":"クリックの有効無効\n@example disabled: false"}]}
        let route = useRoute()
        let router = useRouter()
        let focusId = computed(() => route.query.focus && route.hash.slice(1))
        let shouldRender = (slug) => {
          return !route.query.focus || slug === focusId.value
        }
        let hiddenCount = computed(() => {
          return ["basic","disable"].filter((slug) => !shouldRender(slug)).length
        })

        let showAll = () => {
          router.push({ query: {}, hash: route.hash })
        }

        let openInEditor = (file) => {
           fetch('/__open-in-editor?file=' + encodeURIComponent(file))
        }
        let examples = [
          {
                title: "Basic",
                slug: "basic",
                docs: {"content":"","attrs":{}},
                // encodeURI because the example will contain html tags
                // which will cause this component to be incorrectly parsed
                code: decodeURI("%3Cscript%20setup%3E%0Aimport%20%7B%20ref%20%7D%20from%20'vue'%0Aimport%20CRadio%20from%20'../CRadio.vue'%0A%0Aconst%20radio%20=%20ref('')%0A%3C/script%3E%0A%0A%3Ctemplate%3E%0A%20%20%3CCRadio%20v-model=%22radio%22%20p_Label=%22%E3%83%86%E3%82%B9%E3%83%88%E3%83%A9%E3%83%99%E3%83%AB%E2%91%A0%22%20p_Name=%22testRadio%22%20value=%22testValue1%22%20/%3E%0A%20%20%3CCRadio%20v-model=%22radio%22%20p_Label=%22%E3%83%86%E3%82%B9%E3%83%88%E3%83%A9%E3%83%99%E3%83%AB%E2%91%A1%22%20p_Name=%22testRadio%22%20value=%22testValue2%22%20/%3E%0A%20%20%3CCRadio%20v-model=%22radio%22%20p_Label=%22%E3%83%86%E3%82%B9%E3%83%88%E3%83%A9%E3%83%99%E3%83%AB%E2%91%A2%22%20p_Name=%22testRadio%22%20value=%22testValue3%22%20/%3E%0A%0A%20%20%3Cpre%3Emodel:%20%7B%7B%20radio%20%7D%7D%3C/pre%3E%0A%3C/template%3E%0A%3Cstyle%3E%0A:root%20%7B%0A%20%20--q-primary:%20#5e421d;%0A%7D%0A%3C/style%3E"),
                iframeUrl: "/__iframe/CRadio-basic.html",
                openInEditor: import.meta.env.DEV 
                  ? () => openInEditor("/Users/nakashimakeiju/ghq/github.com/CodeLic/console/src/components/CRadio/examples/Basic.vue") 
                  : undefined 
              },{
                title: "Disable",
                slug: "disable",
                docs: {"content":"","attrs":{}},
                // encodeURI because the example will contain html tags
                // which will cause this component to be incorrectly parsed
                code: decodeURI("%3Cscript%20setup%3E%0Aimport%20%7B%20ref%20%7D%20from%20'vue'%0Aimport%20CRadio%20from%20'../CRadio.vue'%0A%0Aconst%20radio%20=%20ref('')%0A%3C/script%3E%0A%0A%3Ctemplate%3E%0A%20%20%3CCRadio%0A%20%20%20%20v-model=%22radio%22%0A%20%20%20%20p_Label=%22%E3%83%86%E3%82%B9%E3%83%88%E3%83%A9%E3%83%99%E3%83%AB%E2%91%A0%22%0A%20%20%20%20p_Name=%22testRadio%22%0A%20%20%20%20value=%22testValue1%22%0A%20%20%20%20:disabled=%22true%22%0A%20%20/%3E%0A%20%20%3CCRadio%0A%20%20%20%20v-model=%22radio%22%0A%20%20%20%20p_Label=%22%E3%83%86%E3%82%B9%E3%83%88%E3%83%A9%E3%83%99%E3%83%AB%E2%91%A1%22%0A%20%20%20%20p_Name=%22testRadio%22%0A%20%20%20%20value=%22testValue2%22%0A%20%20%20%20:disabled=%22true%22%0A%20%20/%3E%0A%20%20%3CCRadio%0A%20%20%20%20v-model=%22radio%22%0A%20%20%20%20p_Label=%22%E3%83%86%E3%82%B9%E3%83%88%E3%83%A9%E3%83%99%E3%83%AB%E2%91%A2%22%0A%20%20%20%20p_Name=%22testRadio%22%0A%20%20%20%20value=%22testValue3%22%0A%20%20%20%20:disabled=%22true%22%0A%20%20/%3E%0A%0A%20%20%3Cpre%3Emodel:%20%7B%7B%20radio%20%7D%7D%3C/pre%3E%0A%3C/template%3E%0A%3Cstyle%3E%0A:root%20%7B%0A%20%20--q-primary:%20#5e421d;%0A%7D%0A%3C/style%3E"),
                iframeUrl: "/__iframe/CRadio-disable.html",
                openInEditor: import.meta.env.DEV 
                  ? () => openInEditor("/Users/nakashimakeiju/ghq/github.com/CodeLic/console/src/components/CRadio/examples/Disable.vue") 
                  : undefined 
              }
        ]
        </script>
        <template>
          <PageTitle title="CRadio" :openInEditor="() => openInEditor('/Users/nakashimakeiju/ghq/github.com/CodeLic/console/src/components/CRadio/CRadio.vue')" />
          <div v-if="hiddenCount > 0" class="hidden-examples-info">
            {{ hiddenCount }} example{{ hiddenCount > 1 ? "s" : null }} hidden, <a class="viteplay-link" type="button" @click.prevent="showAll">show all</a>
          </div>
          <PropsTable componentName="CRadio" :componentProps="componentProps" />
          <template  
            v-for="example in examples" 
            :key="example.slug">
            <Example 
              v-if="shouldRender(example.slug)"
              :example="example" 
              :componentProps="componentProps" />
          </template>
        </template>

<style scoped>
.hidden-examples-info {
  margin: 20px 0;
}
</style>
      