import{a as x,d as q,r as _,b as V,e as I,c as y,o as d,f as p,g as l,t as z,n as b,_ as w,F as A,h as Q,u as n,i as $,j as L,w as C,k as W,l as h,m as i,p as u,I as X,q as v,s as G,v as J,x as Y}from"./index-CofyC8dZ.js";/** * @license @tabler/icons-vue v3.30.0 - MIT * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. */var Z=x("outline","alarm","IconAlarm",[["path",{d:"M12 13m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0",key:"svg-0"}],["path",{d:"M12 10l0 3l2 0",key:"svg-1"}],["path",{d:"M7 4l-2.75 2",key:"svg-2"}],["path",{d:"M17 4l2.75 2",key:"svg-3"}]]);/** * @license @tabler/icons-vue v3.30.0 - MIT * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. */var ee=x("outline","arrow-left-circle","IconArrowLeftCircle",[["path",{d:"M17 12h-14",key:"svg-0"}],["path",{d:"M6 9l-3 3l3 3",key:"svg-1"}],["path",{d:"M19 12m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0",key:"svg-2"}]]);/** * @license @tabler/icons-vue v3.30.0 - MIT * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. */var te=x("outline","arrow-right-circle","IconArrowRightCircle",[["path",{d:"M18 15l3 -3l-3 -3",key:"svg-0"}],["path",{d:"M5 12m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0",key:"svg-1"}],["path",{d:"M7 12h14",key:"svg-2"}]]);/** * @license @tabler/icons-vue v3.30.0 - MIT * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. */var se=x("outline","pencil","IconPencil",[["path",{d:"M4 20h4l10.5 -10.5a2.828 2.828 0 1 0 -4 -4l-10.5 10.5v4",key:"svg-0"}],["path",{d:"M13.5 6.5l4 4",key:"svg-1"}]]);/** * @license @tabler/icons-vue v3.30.0 - MIT * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. */var oe=x("outline","plus","IconPlus",[["path",{d:"M12 5l0 14",key:"svg-0"}],["path",{d:"M5 12l14 0",key:"svg-1"}]]);/** * @license @tabler/icons-vue v3.30.0 - MIT * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. */var ae=x("outline","restore","IconRestore",[["path",{d:"M3.06 13a9 9 0 1 0 .49 -4.087",key:"svg-0"}],["path",{d:"M3 4.001v5h5",key:"svg-1"}],["path",{d:"M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-2"}]]);/** * @license @tabler/icons-vue v3.30.0 - MIT * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. */var ne=x("outline","trash","IconTrash",[["path",{d:"M4 7l16 0",key:"svg-0"}],["path",{d:"M10 11l0 6",key:"svg-1"}],["path",{d:"M14 11l0 6",key:"svg-2"}],["path",{d:"M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12",key:"svg-3"}],["path",{d:"M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3",key:"svg-4"}]]);/** * @license @tabler/icons-vue v3.30.0 - MIT * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. */var le=x("filled","alarm-filled","IconAlarmFilled",[["path",{d:"M16 6.072a8 8 0 1 1 -11.995 7.213l-.005 -.285l.005 -.285a8 8 0 0 1 11.995 -6.643zm-4 2.928a1 1 0 0 0 -1 1v3l.007 .117a1 1 0 0 0 .993 .883h2l.117 -.007a1 1 0 0 0 .883 -.993l-.007 -.117a1 1 0 0 0 -.993 -.883h-1v-2l-.007 -.117a1 1 0 0 0 -.993 -.883z",key:"svg-0"}],["path",{d:"M6.412 3.191a1 1 0 0 1 1.273 1.539l-.097 .08l-2.75 2a1 1 0 0 1 -1.273 -1.54l.097 -.08l2.75 -2z",key:"svg-1"}],["path",{d:"M16.191 3.412a1 1 0 0 1 1.291 -.288l.106 .067l2.75 2a1 1 0 0 1 -1.07 1.685l-.106 -.067l-2.75 -2a1 1 0 0 1 -.22 -1.397z",key:"svg-2"}]]);/** * @license @tabler/icons-vue v3.30.0 - MIT * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. */var re=x("filled","player-record-filled","IconPlayerRecordFilled",[["path",{d:"M8 5.072a8 8 0 1 1 -3.995 7.213l-.005 -.285l.005 -.285a8 8 0 0 1 3.995 -6.643z",key:"svg-0"}]]);/** * @license @tabler/icons-vue v3.30.0 - MIT * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. */var B=x("filled","player-stop-filled","IconPlayerStopFilled",[["path",{d:"M17 4h-10a3 3 0 0 0 -3 3v10a3 3 0 0 0 3 3h10a3 3 0 0 0 3 -3v-10a3 3 0 0 0 -3 -3z",key:"svg-0"}]]);const E={Control:"Ctrl",Shift:"Shift",Alt:"Alt",Meta:"Win",CapsLock:"Caps",PageUp:"PgUp",PageDown:"PgDn",ScrollLock:"Scr Lk",Insert:"Ins",Delete:"Del",Escape:"Esc",Space:"Space",Backquote:"`",Backslash:"\\",BracketLeft:"[",BracketRight:"]",Comma:",",Equal:"=",Minus:"-",Period:".",Quote:"'",Semicolon:";",Slash:"/",ArrowUp:"▲",ArrowRight:"▶",ArrowDown:"▼",ArrowLeft:"◀",MediaPlayPause:"Play",MediaStop:"Stop",MediaTrackNext:"Next",MediaTrackPrevious:"Prev",MediaVolumeDown:"Down",MediaVolumeUp:"Up",AudioVolumeMute:"Mute",AudioVolumeDown:"Down",AudioVolumeUp:"Up"},O=a=>{const e={};return a.location===1&&(e.loc="left"),a.location===2&&(e.loc="right"),a.location===3&&(e.loc="num"),(a.key.includes("Media")||a.key.includes("Audio"))&&(e.loc=ie(a)),E[a.code]||E[a.key]?e.str=E[a.code]||E[a.key]:e.str=a.key.toLowerCase(),e},ie=a=>{switch(a.key){case"MediaPlayPause":case"MediaStop":case"MediaTrackNext":case"MediaTrackPrevious":return"Media";case"MediaVolumeDown":case"MediaVolumeUp":case"AudioVolumeDown":case"AudioVolumeUp":case"AudioVolumeMute":return"Volume"}},de=(a,e,t)=>a&&a.type==="key"&&a.code===e.code&&a.direction===t,D=q("macrorecorder",()=>{const a=_({record:!1,edit:!1,editKey:!1,editDelay:!1}),e=_([]),t=_({start:0,fixed:!1}),o=()=>e.value[a.value.editKey],s=()=>e.value[a.value.editDelay],r=(f,K=!1,S=!1)=>{const H=e.value[e.value.length-1];let j={};typeof f=="object"&&!de(H,f,K)?(S===!1&&k(),j={type:"key",key:f.key,code:f.code,location:f.location,direction:K,keyObj:O(f)}):K&&S!==!1?(j=e.value[S],j.direction=K):typeof f=="number"&&(j={type:"delay",value:parseFloat(f.toFixed())}),S!==!1?e.value[S]=j:e.value.push(j)},k=()=>{t.value.fixed!==!1?r(t.value.fixed):(t.value.start==0||r(performance.now()-t.value.start),t.value.start=performance.now())},g=()=>{e.value.splice(a.value.editKey,2),a.value.editKey=!1},c=()=>{t.value.start=performance.now()},M=f=>{t.value.fixed=f,U()},U=()=>{e.value=e.value.map(f=>(f.type==="delay"&&t.value.fixed!==!1&&(f.value=t.value.fixed),f))},N=(f,K)=>{f==="key"&&(a.value.editKey=K,a.value.editDelay=!1),f==="delay"&&(a.value.editKey=!1,a.value.editDelay=K)},F=()=>{a.value.edit=!1,a.value.editKey=!1,a.value.editDelay=!1};return{state:a,steps:e,delay:t,getEditKey:o,getEditDelay:s,recordStep:r,deleteEditKey:g,restartDelay:c,changeDelay:M,toggleEdit:N,resetEdit:F,reset:()=>{a.value.record=!1,e.value=[],a.value.edit&&F()}}}),ue={key:0},ce=["innerHTML"],ye={class:"dir"},P={__name:"MacroKey",props:{keyObj:Object,direction:String,active:Boolean},setup(a){const e=a,t=V({value:!1});return I(()=>{e.direction?t.value=e.direction:t.value=e.keyObj.direction}),(o,s)=>(d(),y("kbd",{class:b(a.active?"active":"")},[a.keyObj.loc?(d(),y("sup",ue,z(a.keyObj.loc),1)):p("",!0),l("span",{innerHTML:a.keyObj.str},null,8,ce),l("span",ye,z(t.value==="down"?"↓":"↑"),1)],2))}},ve=["onClick"],pe={__name:"RecorderOutput",setup(a){const e=D();return(t,o)=>(d(),y("div",{class:b(`macro-recorder__output ${n(e).state.record&&"record"} ${n(e).state.edit&&"edit"}`)},[(d(!0),y(A,null,Q(n(e).steps,(s,r)=>(d(),y(A,null,[s.type==="key"?(d(),$(P,{key:r,"key-obj":s.keyObj,direction:s.direction,active:n(e).state.editKey===r,onClick:k=>n(e).state.edit?n(e).toggleEdit("key",r):!1},null,8,["key-obj","direction","active","onClick"])):s.type==="delay"?(d(),y("span",{key:r,class:b(`delay ${n(e).state.editDelay===r?"active":""}`),onClick:k=>n(e).toggleEdit("delay",r)},z(s.value<1e4?s.value+"ms":">10s"),11,ve)):p("",!0),o[0]||(o[0]=l("hr",{class:"spacer"},null,-1))],64))),256))],2))}},fe=w(pe,[["__scopeId","data-v-120bb3c9"]]),me={__name:"RecorderInput",setup(a){const e=_(null),t=D();return L(()=>{t.state.record&&(e.value.focus(),t.delay.start!==0&&t.restartDelay())}),(o,s)=>(d(),y("div",{class:b(`recorder-input__container ${n(t).state.record&&"record"}`)},[n(t).state.record?(d(),y("input",{key:0,class:b(`macro-recorder__input ${n(t).state.record&&"record"}`),type:"text",ref_key:"macroInput",ref:e,onFocus:s[0]||(s[0]=r=>console.log("focus")),onKeydown:s[1]||(s[1]=C(r=>n(t).recordStep(r,"down"),["prevent"])),onKeyup:s[2]||(s[2]=C(r=>n(t).recordStep(r,"up"),["prevent"]))},null,34)):p("",!0)],2))}},ge=w(me,[["__scopeId","data-v-5e1bd387"]]),ke=["href"],m={__name:"ButtonComp",props:{href:String,variant:String,size:String},setup(a){const e=a,t=W(()=>{const o={"bg-sky-500/80 hover:bg-sky-400 text-white border-sky-400":e.variant==="primary","bg-white/80 hover:bg-white text-slate-900 border-white":e.variant==="secondary","bg-red-700/80 hover:bg-red-700 text-white border-red-800":e.variant==="danger","bg-slate-700/80 hover:bg-slate-700 text-white border-slate-600":e.variant==="dark","bg-lime-500/80 hover:bg-lime-500 text-white border-lime-600":e.variant==="success","button__subtle bg-transparent hover:bg-white/10 text-white border-transparent":e.variant==="subtle","button__ghost bg-transparent text-white/80 border-transparent hover:text-white":e.variant==="ghost","button__lg px-5 py-3 text-lg gap-4":e.size==="lg","button__sm px-3 py-1.5 text-sm gap-2":e.size==="sm","px-4 py-2 gap-3":e.size!=="sm"&&e.size!=="lg"};return Object.keys(o).filter(s=>o[s]).join(" ")});return(o,s)=>a.href?(d(),y("a",{key:0,href:a.href,class:b(`button ${t.value}`)},[h(o.$slots,"default")],10,ke)):(d(),y("button",{key:1,class:b(`button ${t.value}`)},[h(o.$slots,"default")],2))}},_e={class:"context-menu"},T={__name:"ContextMenu",props:{open:Boolean},setup(a){const e=a,t=_(!1);return I(()=>{t.value=e.open}),(o,s)=>(d(),y("div",_e,[l("div",{class:"context-menu__trigger",onClick:s[0]||(s[0]=r=>t.value=!t.value)},[h(o.$slots,"trigger")]),l("div",{class:b(`context-menu__content ${t.value?"open":""}`)},[h(o.$slots,"content")],2)]))}},be={class:"dialog-container"},$e={__name:"DialogComp",props:{open:Boolean},emits:["onOpen","onClose","onToggle"],setup(a,{emit:e}){const t=_(null),o=_(),s=e,r=a;I(()=>{console.log("onmounted",r.open),k(r.open)}),L(()=>{console.log("onupdated",r.open)});const k=g=>{g?(t.value.showModal(),s("onOpen")):(t.value.close(),s("onClose")),o.value=g,s("onToggle")};return I(()=>{o.value=r.open,t.value.innerHTML.includes("form")&&t.value.querySelector("form").addEventListener("submit",()=>{k()})}),(g,c)=>(d(),y("div",be,[l("div",{class:"trigger",onClick:c[0]||(c[0]=M=>k(!0))},[h(g.$slots,"trigger",{},void 0,!0)]),l("dialog",{ref_key:"dialog",ref:t},[i(m,{class:"dialog__close p-0",variant:"ghost",size:"sm",tabindex:"-1",onClick:c[1]||(c[1]=M=>k(!1))},{default:u(()=>[i(n(X))]),_:1}),h(g.$slots,"content",{},void 0,!0)],512)]))}},R=w($e,[["__scopeId","data-v-66c38329"]]),we={type:"number",step:"10",min:"0",max:"3600000",ref:"customDelayInput",placeholder:"100"},xe={class:"flex justify-end"},De={__name:"FixedDelayMenu",setup(a){const e=D();return _(!1),(t,o)=>(d(),$(T,null,{trigger:u(()=>[i(m,{variant:"secondary",size:"sm"},{default:u(()=>[i(n(le)),o[5]||(o[5]=v("Fixed delay "))]),_:1})]),content:u(()=>[l("ul",null,[l("li",{onClick:o[0]||(o[0]=s=>n(e).changeDelay(0))},"0ms"),l("li",{onClick:o[1]||(o[1]=s=>n(e).changeDelay(15))},"15ms"),l("li",{onClick:o[2]||(o[2]=s=>n(e).changeDelay(50))},"50ms"),l("li",{onClick:o[3]||(o[3]=s=>n(e).changeDelay(100))},"100ms"),l("li",null,[i(R,null,{trigger:u(()=>o[6]||(o[6]=[l("span",null,"Custom delay",-1)])),content:u(()=>[o[9]||(o[9]=l("h4",{class:"text-slate-50 mb-4"},"Custom delay",-1)),l("form",{class:"grid gap-4 w-44",onSubmit:o[4]||(o[4]=C(s=>n(e).changeDelay(parseInt(t.$refs.customDelayInput.value)),["prevent"]))},[l("div",null,[l("input",we,null,512),o[7]||(o[7]=l("span",null,"ms",-1))]),l("div",xe,[i(m,{variant:"primary",size:"sm"},{default:u(()=>o[8]||(o[8]=[v("Set custom delay")])),_:1})])],32)]),_:1})])])]),_:1}))}},Me=w(De,[["__scopeId","data-v-717b0d71"]]),Ce={id:"edit-key-dialog",class:"dialog__content"},Ie={class:"grid gap-4","submit.prevent":""},Ke={class:"flex gap-2 justify-center"},je={class:"flex justify-end"},he={__name:"EditKeyDialog",setup(a){const e=V({key:{},newKey:{}}),t=D(),o=_(null);I(()=>{e.key=t.getEditKey(),e.newKey.direction=e.key.direction});const s=g=>{e.newKey.e=g,e.newKey.keyObj=O(g)},r=g=>{e.newKey.direction=g,e.newKey.keyObj=O(e.key)},k=()=>{t.recordStep(e.newKey.e,e.newKey.direction,t.state.editKey),t.state.editKey=!1};return(g,c)=>(d(),y("div",Ce,[c[9]||(c[9]=l("h4",{class:"text-slate-50 mb-4"},"Press a key",-1)),l("div",{class:"flex justify-center",onClick:c[0]||(c[0]=M=>g.$refs.newKeyInput.focus())},[e.key.keyObj?(d(),$(P,{key:0,"key-obj":e.key.keyObj,direction:e.key.direction},null,8,["key-obj","direction"])):p("",!0),typeof e.newKey.keyObj=="object"?(d(),y(A,{key:1},[c[5]||(c[5]=l("span",{class:"px-4 flex items-center text-white"}," >>> ",-1)),i(P,{"key-obj":e.newKey.keyObj,direction:e.newKey.direction},null,8,["key-obj","direction"])],64)):p("",!0)]),l("form",Ie,[l("input",{class:"size-0 opacity-0",type:"text",min:"0",max:"1",ref_key:"newKeyInput",ref:o,placeholder:"New key",autofocus:"",onKeydown:c[1]||(c[1]=C(M=>s(M),["prevent"]))},null,544),l("div",Ke,[i(m,{variant:"secondary",class:b(e.newKey.direction==="down"?"selected":""),size:"sm",onClick:c[2]||(c[2]=C(M=>r("down"),["prevent"]))},{default:u(()=>c[6]||(c[6]=[v(" ↓ Down ")])),_:1},8,["class"]),i(m,{variant:"secondary",class:b(e.newKey.direction==="up"?"selected":""),size:"sm",onClick:c[3]||(c[3]=C(M=>r("up"),["prevent"]))},{default:u(()=>c[7]||(c[7]=[v(" ↑ Up ")])),_:1},8,["class"])]),l("div",je,[i(m,{variant:"primary",size:"sm",onClick:c[4]||(c[4]=C(M=>k(),["prevent"]))},{default:u(()=>c[8]||(c[8]=[v(" Change key ")])),_:1})])])]))}},Se=w(he,[["__scopeId","data-v-bda94401"]]),Re={id:"edit-delay-dialog",class:"dialog__content"},Ee={key:0,class:"flex justify-center"},ze={class:"delay !text-lg"},Oe={class:"grid gap-4 mt-6","submit.prevent":""},Pe={key:0},Ae={class:"flex justify-end"},Ve={__name:"EditDelayDialog",setup(a){const e=D(),t=V({delay:{},newDelay:{value:0}});I(()=>{t.delay=e.getEditDelay(),t.newDelay.value=t.delay.value,console.log(t)});const o=()=>{t.newDelay.value&&(e.recordStep(t.newDelay.value,!1,e.state.editDelay),e.state.editDelay=!1)};return(s,r)=>(d(),y("div",Re,[r[4]||(r[4]=l("h4",{class:"text-slate-50 mb-4"},"Edit delay",-1)),t.delay.value?(d(),y("div",Ee,[l("span",ze,z(t.delay.value)+"ms ",1)])):p("",!0),l("form",Oe,[t.newDelay.value?(d(),y("div",Pe,[G(l("input",{type:"number",min:"0",max:"3600000",step:"10","onUpdate:modelValue":r[0]||(r[0]=k=>t.newDelay.value=k),autofocus:""},null,512),[[J,t.newDelay.value]]),r[2]||(r[2]=l("span",null,"ms",-1))])):p("",!0),l("div",Ae,[i(m,{variant:"primary",size:"sm",onClick:r[1]||(r[1]=C(k=>o(),["prevent"]))},{default:u(()=>r[3]||(r[3]=[v(" Change delay ")])),_:1})])])]))}},Fe=w(Ve,[["__scopeId","data-v-dab893e1"]]),Be={id:"delete-key-dialog",class:"dialog__content"},Le={class:"flex justify-center w-full mb-4"},Te={class:"flex justify-end gap-2 mt-6"},Ue={__name:"DeleteKeyDialog",setup(a){const e=D(),t=_(null);return I(()=>{t.value=O(e.getEditKey()),console.log(t.value)}),(o,s)=>(d(),y("div",Be,[s[2]||(s[2]=l("h4",{class:"text-slate-50 mb-4"},"Delete key",-1)),l("div",Le,[t.value?(d(),$(P,{key:0,"key-obj":t.value},null,8,["key-obj"])):p("",!0)]),s[3]||(s[3]=l("p",{class:"text-sm text-slate-300"},"Are you sure you want to delete this key?",-1)),l("div",Te,[i(m,{variant:"danger",size:"sm",onClick:s[0]||(s[0]=r=>n(e).deleteEditKey())},{default:u(()=>s[1]||(s[1]=[v(" Delete key ")])),_:1})])]))}},Ne=w(Ue,[["__scopeId","data-v-00a9d5f9"]]),He={__name:"InsertKeyDialog",props:{position:String},setup(a){return(e,t)=>(d(),y("div",null,"asdfasdfasdf"))}},qe=w(He,[["__scopeId","data-v-42a18ae9"]]),Qe={key:0,class:"macro-edit__dialogs"},We={key:0,class:"flex gap-2"},Xe={__name:"EditDialogs",setup(a){const e=D(),t=_(null);return(o,s)=>n(e).state.edit!==!1?(d(),y("div",Qe,[n(e).state.editKey!==!1&&typeof n(e).getEditKey()=="object"?(d(),y("div",We,[i(T,null,{trigger:u(()=>[i(m,{variant:"success",size:"sm"},{default:u(()=>[i(n(oe)),s[6]||(s[6]=v(" Insert key "))]),_:1})]),content:u(()=>[l("ul",null,[l("li",{onClick:s[0]||(s[0]=r=>t.value="before")},[i(n(ee)),s[7]||(s[7]=v(" Before"))]),l("li",{onClick:s[1]||(s[1]=r=>t.value="after")},[i(n(te)),s[8]||(s[8]=v(" After"))])])]),_:1}),t.value!==null?(d(),$(R,{key:0,open:!0,onOnClose:s[2]||(s[2]=r=>t.value=null)},{content:u(()=>[i(qe,{position:t.value},null,8,["position"])]),_:1})):p("",!0),i(R,null,{trigger:u(()=>[i(m,{size:"sm",variant:"danger",onClick:s[3]||(s[3]=r=>console.log("delete"))},{default:u(()=>[i(n(ne)),s[9]||(s[9]=v("Delete key "))]),_:1})]),content:u(()=>[i(Ne)]),_:1}),i(R,{id:`edit-key-${n(e).state.editKey}`,onOnClose:s[4]||(s[4]=r=>n(e).state.editKey=!1)},{trigger:u(()=>[i(m,{variant:"primary",size:"sm"},{default:u(()=>[i(n(Y)),s[10]||(s[10]=v("Edit key "))]),_:1})]),content:u(()=>[i(Se)]),_:1},8,["id"])])):p("",!0),n(e).state.editDelay!==!1&&typeof n(e).getEditDelay()=="object"?(d(),$(R,{key:1,onOnClose:s[5]||(s[5]=r=>n(e).state.editDelay=!1)},{trigger:u(()=>[i(m,{variant:"primary",size:"sm"},{default:u(()=>[i(n(Z)),s[11]||(s[11]=v("Edit delay "))]),_:1})]),content:u(()=>[i(Fe)]),_:1})):p("",!0)])):p("",!0)}},Ge=w(Xe,[["__scopeId","data-v-a4021a44"]]),Je={class:"macro-recorder__header"},Ye={__name:"RecorderHeader",setup(a){const e=D();return(t,o)=>(d(),y("div",Je,[l("div",{class:b(`recording__buttons ${n(e).state.edit?"disabled":""}`)},[n(e).state.record?p("",!0):(d(),$(m,{key:0,variant:"primary",onClick:o[0]||(o[0]=s=>n(e).state.record=!0)},{default:u(()=>[i(n(re),{class:"text-red-500"}),o[4]||(o[4]=v("Start recording "))]),_:1})),n(e).state.record?(d(),$(m,{key:1,variant:"danger",onClick:o[1]||(o[1]=s=>n(e).state.record=!1)},{default:u(()=>[i(n(B),{class:"text-white"}),o[5]||(o[5]=v("Stop recording "))]),_:1})):p("",!0)],2),l("div",{class:b(`edit__buttons ${n(e).state.record?"disabled":""}`)},[l("div",null,[n(e).state.edit?p("",!0):(d(),$(m,{key:0,variant:"secondary",onClick:o[2]||(o[2]=s=>n(e).state.edit=!0)},{default:u(()=>[i(n(se)),o[6]||(o[6]=v("Edit macro "))]),_:1})),n(e).state.edit?(d(),$(m,{key:1,variant:"dark",onClick:o[3]||(o[3]=s=>n(e).resetEdit())},{default:u(()=>[i(n(B)),o[7]||(o[7]=v("Stop editing "))]),_:1})):p("",!0)]),n(e).state.edit?(d(),$(Me,{key:0})):p("",!0),i(Ge)],2)]))}},Ze=w(Ye,[["__scopeId","data-v-8ee908ec"]]),et={class:"macro-recorder__footer"},tt={__name:"RecorderFooter",setup(a){const e=D();return(t,o)=>(d(),y("div",et,[n(e).steps.length>0?(d(),$(m,{key:0,variant:"danger",size:"sm",onClick:o[0]||(o[0]=s=>n(e).reset())},{default:u(()=>[i(n(ae)),o[1]||(o[1]=v(" Reset "))]),_:1})):p("",!0)]))}},st=w(tt,[["__scopeId","data-v-096c0ec0"]]),ot={class:"macro-recorder"},at={__name:"MacroRecorder",setup(a){const e=D();return(t,o)=>(d(),y("div",ot,[i(Ze),l("div",{class:b(`recorder-interface__container ${n(e).state.record&&"record"} ${n(e).state.edit&&"edit"}`)},[i(fe),i(ge)],2),i(st)]))}},nt={id:"macros",class:"panel"},lt={__name:"MacrosView",setup(a){return _(!1),_(null),I(()=>{}),(e,t)=>(d(),y("div",nt,[t[0]||(t[0]=l("h1",null,"Macros",-1)),i(at)]))}},dt=w(lt,[["__scopeId","data-v-99266354"]]);export{dt as default}; //# sourceMappingURL=MacrosView-qnUNtUm0.js.map