/**
 * @file ext-panning.js
 *
 * @license MIT
 *
 * @copyright 2013 Luis Aguirre
 *
 */
const e="panning",loadExtensionTranslation=async function(n){let s;const u=n.configObj.pref("lang");try{s=await function __variableDynamicImportRuntime0__(e){switch(e){case"./locale/en.js":return Promise.resolve().then((function(){return t}));case"./locale/pl.js":return Promise.resolve().then((function(){return r}));case"./locale/sv.js":return Promise.resolve().then((function(){return a}));case"./locale/tr.js":return Promise.resolve().then((function(){return o}));case"./locale/uk.js":return Promise.resolve().then((function(){return i}));case"./locale/zh-CN.js":return Promise.resolve().then((function(){return l}));default:return new Promise((function(n,t){("function"==typeof queueMicrotask?queueMicrotask:setTimeout)(t.bind(null,new Error("Unknown variable dynamic import: "+e)))}))}}(`./locale/${u}.js`)}catch(n){console.warn(`Missing translation (${u}) for ${e} - using 'en'`),s=await Promise.resolve().then((function(){return t}))}n.i18next.addResourceBundle(u,e,s.default)};var n={name:e,async init(){const n=this;await loadExtensionTranslation(n);const{svgCanvas:t}=n,{$id:r,$click:a}=t;return{name:n.i18next.t(`${e}:name`),callback(){const e=document.createElement("template");var n,o;e.innerHTML='\n        <se-button id="ext-panning" title="Przesuwanie [Spacja / kółko myszki + przeciąganie]" src="panning.svg"></se-button>\n        ',n=r("tool_zoom"),o=e.content.cloneNode(!0),n.parentNode.insertBefore(o,n.nextSibling),a(r("ext-panning"),(()=>{this.leftPanel.updateLeftPanel("ext-panning")&&t.setMode("ext-panning")}))},mouseDown(){if("ext-panning"===t.getMode())return n.setPanning(!0),{started:!0}},mouseUp(){if("ext-panning"===t.getMode())return n.setPanning(!1),{keep:!1,element:null}}}}},t=Object.freeze({__proto__:null,default:{name:"Extension Panning",buttons:[{title:"Panning"}]}}),r=Object.freeze({__proto__:null,default:{name:"Rozszerzenie przesuwania",buttons:[{title:"Przesuwanie"}]}}),a=Object.freeze({__proto__:null,default:{name:"Panorering av tillägg",buttons:[{title:"Panorering"}]}}),o=Object.freeze({__proto__:null,default:{name:"Kaydırma Aracı ",buttons:[{title:"Kaydırma"}]}}),i=Object.freeze({__proto__:null,default:{name:"Розширення: Малювання",buttons:[{title:"Малювання"}]}}),l=Object.freeze({__proto__:null,default:{name:"移动",buttons:[{title:"移动"}]}});export{n as default};
//# sourceMappingURL=ext-panning.js.map
