import{Q as b,a as r}from"./chunk-C64o1gyF.js";import{m as y,a as f,e as v,b as _,t as l}from"./app-CPb3bToC.js";import{u as g}from"./chunk-D3IYX2LY.js";import{E as p,q as a,as as i,D as u,V as o,X as d,an as n,u as m,F as k,at as h}from"./chunk-DhYw-kuD.js";import"./chunk-CusLMHK2.js";import"./chunk-C7mbSHwF.js";import"./chunk-DfTn_VfD.js";import"./chunk-Bzmka5Fh.js";import"./chunk-DOJZQpJk.js";import"./chunk-xwEmqXCW.js";import"./chunk-D3Pjrapm.js";import"./chunk-DbbZ0htz.js";import"./chunk-BoHz2A9L.js";const w={class:"flex-col",style:{margin:"0.5rem 0.5rem 0 0.5rem",height:"3rem",width:"103rem","padding-right":"2px"},bordered:""},S={style:{height:"100%","min-width":"10rem"}},V={key:0,style:{height:"100%","min-width":"10rem"}},B={key:1,style:{height:"100%","min-width":"10rem"}},D={key:2,style:{height:"100%","min-width":"10rem"}},N={key:3,style:{height:"100%","min-width":"10rem"}},R={key:4},T={data(){return{tabv:"keyboard",type_device:"",type_protocol:""}},updated(){const s=y();s.path_tab=this.tabv,f().current_device!==null&&this.$router.push({path:"/"+this.tabv,params:{}})},computed:{...v(g,{isRhythmSupport:"isSupport"}),isDev(){return!1},isMagneticSwitchKeyboard(){return _().isMagneticSwitchKeyboard}},watch:{isRhythmSupport(s){!s&&this.tabv==="rhythm"&&(this.tabv="keyboard")}},async created(){try{let e=_();await e.fetch_feature_key_type(),await e.fetch_feature_key_precision();const c=f();this.type_device=c.current_device.type_device,this.type_protocol=c.current_device.type_protocol}catch{}const s=y();this.tabv=s.path_tab,f().current_device!==null&&this.$router.push({path:"/"+this.tabv,params:{}})},methods:{async on_page_change(){const s=y();s.path_tab=this.tabv,f().current_device!==null&&this.$router.push({path:"/"+this.tabv,params:{}})}}},z=Object.assign(T,{__name:"TopBar",setup(s){return(t,e)=>(u(),p("div",w,[a(b,{align:"left",modelValue:t.tabv,"onUpdate:modelValue":[e[0]||(e[0]=c=>t.tabv=c),t.on_page_change],style:{"background-color":"var(--color-98)",color:"var(--text-primary)",height:"100%",outline:"2px solid var(--color-90)","border-radius":"0.5rem","box-shadow":"0 2px 4px rgba(0, 0, 0, 0.1)"}},{default:i(()=>[a(r,{name:"keyboard",style:{"min-width":"10rem"}},{default:i(()=>[e[1]||(e[1]=o("i",{class:"fa-solid fa-keyboard"},null,-1)),d(" "+n(m(l)("button_config")),1)]),_:1}),t.type_device==="keyboard"?(u(),p(k,{key:0},[o("div",S,[a(r,{name:"lighting",class:"fit"},{default:i(()=>[e[2]||(e[2]=o("i",{class:"fa-solid fa-lightbulb"},null,-1)),d(" "+n(m(l)("light_config")),1)]),_:1})]),t.isRhythmSupport?(u(),p("div",V,[a(r,{name:"rhythm",class:"fit"},{default:i(()=>[e[3]||(e[3]=o("i",{class:"fa-solid fa-music"},null,-1)),d(" "+n(m(l)("rhythm_config")),1)]),_:1})])):h("",!0)],64)):t.type_device==="mouse"?(u(),p("div",B,[a(r,{name:"lighting",class:"fit"},{default:i(()=>[e[4]||(e[4]=o("i",{class:"fa-solid fa-gauge-high"},null,-1)),d(" "+n(m(l)("dpi_config")),1)]),_:1})])):h("",!0),a(r,{name:"macro",style:{height:"100%","min-width":"10rem"}},{default:i(()=>[e[5]||(e[5]=o("i",{class:"fa-solid fa-scroll"},null,-1)),d(" "+n(m(l)("macro_config")),1)]),_:1}),t.type_protocol==="kb_by_v3_wired"&&t.isMagneticSwitchKeyboard?(u(),p("div",D,[a(r,{name:"performance",class:"fit"},{default:i(()=>[e[6]||(e[6]=o("i",{class:"fa-solid fa-chart-simple"},null,-1)),d(" "+n(m(l)("performance")),1)]),_:1})])):h("",!0),t.type_protocol==="kb_by_v3_wired"?(u(),p("div",N,[a(r,{name:"advanced",class:"fit"},{default:i(()=>[e[7]||(e[7]=o("i",{class:"fa-solid fa-wrench"},null,-1)),d(" "+n(m(l)("advanced_keys")),1)]),_:1})])):h("",!0),a(r,{name:"features",style:{"min-width":"10rem"}},{default:i(()=>[e[8]||(e[8]=o("i",{class:"fa-solid fa-atom"},null,-1)),d(" "+n(m(l)("device_feature")),1)]),_:1}),t.type_device==="keyboard"&&t.isDev?(u(),p("div",R,[a(r,{name:"custom_keys_layout",style:{"min-width":"10rem"}},{default:i(()=>[e[9]||(e[9]=o("i",{class:"fa-solid fa-wrench"},null,-1)),d(" "+n(m(l)("custom_keys_layout")),1)]),_:1})])):h("",!0)]),_:1},8,["modelValue","onUpdate:modelValue"])]))}});export{z as default};
