
        <script setup>
        import { computed } from "vue"
        import { Playground, PropsTable, ExampleHeader, PageTitle } from "@viteplay/vue"
        import { useRoute, useRouter } from "vue-router"
                
        
            let modules_0 = {}
            import  module_0_0 from "/Users/nakashimakeiju/ghq/github.com/CodeLic/console/src/components/CTab/CTab.vue"
              modules_0["../CTab.vue"] = module_0_0
              
import * as  module_0_1 from "vue"
              modules_0["vue"] = module_0_1
              
            

            let modules_1 = {}
            import  module_1_0 from "/Users/nakashimakeiju/ghq/github.com/CodeLic/console/src/components/CTab/CTab.vue"
              modules_1["../CTab.vue"] = module_1_0
              
import * as  module_1_1 from "vue"
              modules_1["vue"] = module_1_1
              
            

        let componentProps = {"CTab":[{"name":"p_TabTitle","type":"array","required":false,"desc":"タブ内のテキスト\n* @example p_TabTitle: [\n      { content: 'text', badgeNum:10 },\n      { content: 'text' },\n    ]"},{"name":"modelValue","type":"number","required":false,"desc":"選択tabの初期値\n@example modelValue: 0"}]}
        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","secondary"].filter((slug) => !shouldRender(slug)).length
        })

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

        let openInEditor = (file) => {
           fetch('/__open-in-editor?file=' + encodeURIComponent(file))
        }
        </script>
        <template>
          <PageTitle title="CTab" :openInEditor="() => openInEditor('/Users/nakashimakeiju/ghq/github.com/CodeLic/console/src/components/CTab/CTab.vue')" />
          <div v-if="hiddenCount > 0" class="hidden-examples-info">
            {{ hiddenCount }} example{{ hiddenCount > 1 ? "s" : null }} hidden, <a @click.prevent="showAll" type="button" style="cursor: pointer">show all</a>
          </div>
          <PropsTable componentName="CTab" :componentProps="componentProps" />
          
          <section v-if="shouldRender('basic')" class="viteplay-example">

            <ExampleHeader slug="basic" title="Basic" />

            <div class="viteplay-docs"></div>

            <Playground :darkExample="false" :componentProps="componentProps" :openInEditor="() => openInEditor('/Users/nakashimakeiju/ghq/github.com/CodeLic/console/src/components/CTab/examples/Basic.vue')" :modules="modules_0" :code="decodeURI(`%3Cscript%20setup%3E%0Aimport%20CTab%20from%20'../CTab.vue'%0Aimport%20%7B%20ref%20%7D%20from%20'vue'%0Aconst%20tab%20=%20%5B%7B%20content:%20'%E3%82%A2%E3%83%97%E3%83%AA%E3%81%AB%E6%8E%B2%E8%BC%89%E3%81%97%E3%81%AA%E3%81%84',%20badgeNum:%2010%20%7D,%20%7B%20content:%20'%E3%82%A2%E3%83%97%E3%83%AA%E3%81%AB%E6%8E%B2%E8%BC%89%E3%81%97%E3%81%AA%E3%81%84'%20%7D%5D%0A//%E9%81%B8%E6%8A%9Etab%E3%81%AE%E5%88%9D%E6%9C%9F%E5%80%A4%0Aconst%20num%20=%20ref(0)%0A%3C/script%3E%0A%0A%3Ctemplate%3E%0A%20%20%3Cdiv%20class=%22test%22%3E%0A%20%20%20%20%3CCTab%20:p_TabTitle=%22tab%22%20v-model=%22num%22%20/%3E%0A%20%20%3C/div%3E%0A%20%20model:%7B%7B%20num%20%7D%7D%0A%3C/template%3E%0A%3Cstyle%3E%0A:root%20%7B%0A%20%20--q-primary:%20#5e421d;%0A%20%20--q-secondary:%20#f2961c;%0A%7D%0A.test%20%7B%0A%20%20width:%20500px;%0A%7D%0A%3C/style%3E`)" />
          </section>
            

          <section v-if="shouldRender('secondary')" class="viteplay-example">

            <ExampleHeader slug="secondary" title="secondary" />

            <div class="viteplay-docs"></div>

            <Playground :darkExample="false" :componentProps="componentProps" :openInEditor="() => openInEditor('/Users/nakashimakeiju/ghq/github.com/CodeLic/console/src/components/CTab/examples/secondary.vue')" :modules="modules_1" :code="decodeURI(`%3Cscript%20setup%3E%0Aimport%20CTab%20from%20'../CTab.vue'%0Aimport%20%7B%20ref%20%7D%20from%20'vue'%0A//%E9%81%B8%E6%8A%9Etab%E3%81%AE%E5%88%9D%E6%9C%9F%E5%80%A4%0Aconst%20num%20=%20ref(0)%0Aconst%20tab%20=%20%5B%0A%20%20%7B%20content:%20'Tab1',%20badgeNum:%201%20%7D,%0A%20%20%7B%20content:%20'Tab2'%20%7D,%0A%20%20%7B%20content:%20'Tab3'%20%7D,%0A%20%20%7B%20content:%20'Tab4'%20%7D,%0A%20%20%7B%20content:%20'Tab5'%20%7D,%0A%20%20%7B%20content:%20'Tab6'%20%7D,%0A%5D%0A%3C/script%3E%0A%0A%3Ctemplate%3E%0A%20%20%3CCTab%20:p_TabTitle=%22tab%22%20v-model=%22num%22%20/%3E%0A%3C/template%3E`)" />
          </section>
            
        </template>

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