var y=Object.defineProperty,f=Object.defineProperties;var D=Object.getOwnPropertyDescriptors;var m=Object.getOwnPropertySymbols;var E=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;var c=(e,l,t)=>l in e?y(e,l,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[l]=t,s=(e,l)=>{for(var t in l||(l={}))E.call(l,t)&&c(e,t,l[t]);if(m)for(var t of m(l))a.call(l,t)&&c(e,t,l[t]);return e},n=(e,l)=>f(e,D(l));const K=(e,l,t)=>{e.key==="u"&&(e.ctrlKey||e.metaKey)?(e.preventDefault(),t({type:"UPDATE_ELEMENT",payload:{elementDetails:n(s({},l.selectedElement),{styles:n(s({},l.selectedElement.styles),{textDecoration:l.selectedElement.styles.textDecoration==="underline"?"none":"underline"})})}})):e.key==="i"&&(e.ctrlKey||e.metaKey)?(e.preventDefault(),t({type:"UPDATE_ELEMENT",payload:{elementDetails:n(s({},l.selectedElement),{styles:n(s({},l.selectedElement.styles),{fontStyle:l.selectedElement.styles.fontStyle==="italic"?"normal":"italic"})})}})):e.key==="b"&&(e.ctrlKey||e.metaKey)?(e.preventDefault(),t({type:"UPDATE_ELEMENT",payload:{elementDetails:n(s({},l.selectedElement),{styles:n(s({},l.selectedElement.styles),{fontWeight:l.selectedElement.styles.fontWeight==="700"?"normal":"700"})})}})):e.key==="e"&&(e.ctrlKey||e.metaKey)&&(e.preventDefault(),t({type:"UPDATE_ELEMENT",payload:{elementDetails:n(s({},l.selectedElement),{styles:n(s({},l.selectedElement.styles),{textAlign:l.selectedElement.styles.textAlign==="center"?"left":"center"})})}}))};export{K as f};
