import{_ as h}from"./settings.consts-C6F6lZ8o.js";import{B as D}from"./ThemeToggle-a3yohy6x.js";import"./vendor-vueform-slider-CCH9_7pb.js";import{u as k}from"./useAppearanceStore-IzenP-G4.js";import{d as S,e as a,f as r,i as d,x as s,j as l,t as x}from"./vendor-vue-runtime-core-DwK6Ry68.js";import{u as p}from"./vendor-vue-reactivity-CheHbvBM.js";import{a as m}from"./vendor-vue-shared-DrzsEcag.js";import{_ as g}from"./vendor-vue3-html2pdf-KR020wX8.js";const w={class:"ccb-themes-editor__header"},B={class:"ccb-themes-editor__title-wrap"},T={key:0,class:"ccb-themes-editor__device"},C=S({__name:"AppearanceHeader",props:{title:{},sectionKey:{},showDeviceSwitch:{type:Boolean,default:!1},deviceType:{},additionalResetKeys:{}},emits:["update:deviceType"],setup(u,{emit:f}){const i=u,v=f,o=k(),c=a(()=>i.deviceType||o.getEditorDevice),_=a(()=>{const e=o.getEditingPreset;return!!(e!=null&&e.desktop&&(e!=null&&e.mobile))});function n(e){if(v("update:deviceType",e),typeof o.setEditorDevice=="function"){o.setEditorDevice(e);return}o.$patch({editorDevice:e})}function b(){i.sectionKey&&typeof o.resetSectionToDefault=="function"&&o.resetSectionToDefault(i.sectionKey,i.additionalResetKeys)}return(e,t)=>(d(),r("div",w,[s("div",B,[l(p(h),{text:i.title,size:"m",weight:"bold"},null,8,["text"]),i.showDeviceSwitch&&_.value?(d(),r("div",T,[s("button",{class:m(["ccb-themes-editor__device-btn",{active:c.value==="desktop"}]),onClick:t[0]||(t[0]=y=>n("desktop"))},t[2]||(t[2]=[s("i",{class:"ccb-icon-ic_desktop"},null,-1)]),2),s("button",{class:m(["ccb-themes-editor__device-btn",{active:c.value==="mobile"}]),onClick:t[1]||(t[1]=y=>n("mobile"))},t[3]||(t[3]=[s("i",{class:"ccb-icon-ic_mobile"},null,-1)]),2)])):x("",!0)]),l(p(D),{label:"Reset",size:"s",type:"blue-ghost",textSize:"s",textWeight:"regular",onClick:b})]))}}),H=g(C,[["__scopeId","data-v-5a8139b9"]]);export{H as A};
//# sourceMappingURL=AppearanceHeader-Bmc_R2Bt.js.map
