
/**
 * 由 Fantastic-admin 提供技术支持
 * Powered by Fantastic-admin
 * https://fantastic-admin.hurui.me
 */
  
import{B as e,Ct as t,Tt as n,bt as r}from"./reactivity.esm-bundler-D9OPVc9J.js";import{D as i,_ as a,b as o,mt as s,y as c}from"./runtime-core.esm-bundler-D-xeQwTN.js";import{Z as l,z as u}from"./lib-C-QGo8GG-CvPpiVvZ.js";import{t as d}from"./_plugin-vue_export-helper-B3ysoDQm-BDNMzG2s.js";import{n as f}from"./BaseIcon-DJbOzCDs-C4GBSsnJ.js";function p(e,t){return u(l(e),t)}var m=[`disabled`],h=d({__name:`BaseZoomControls`,props:{config:{type:Object,default(){return{}}},scale:{type:Number,default:0},withDirection:{type:Boolean,default:!1},isFullscreen:{type:Boolean,default:!1},isCursorPointer:{type:Boolean,default:!1}},emits:[`zoomIn`,`zoomOut`,`resetZoom`,`switchDirection`],setup(l,{emit:u}){let d=u;return(u,h)=>(s(),o(`div`,{class:r({"vue-data-ui-zoom-controls":!0,"vue-data-ui-zoom-controls-fullscreen":l.isFullscreen}),"data-dom-to-png-ignore":``,style:t({border:l.config.style.chart.controls.border,backgroundColor:l.config.style.chart.controls.backgroundColor,padding:l.config.style.chart.controls.padding,borderRadius:l.config.style.chart.controls.borderRadius,"--vue-data-ui-zoom-control-button-color":l.config.style.chart.controls.buttonColor,"--vue-data-ui-zoom-control-button-color-hover":e(p)(l.config.style.chart.controls.buttonColor,.2)})},[a(`button`,{onClick:h[0]||(h[0]=e=>d(`zoomOut`)),class:`vue-data-ui-zoom-controls-button`,"data-cy-zoom-out":``,style:t({cursor:l.isCursorPointer?`pointer`:`default`})},[i(f,{name:`zoomMinus`,stroke:l.config.style.chart.controls.color,size:l.config.style.chart.controls.fontSize*1.2},null,8,[`stroke`,`size`])],4),a(`button`,{class:`vue-data-ui-zoom-controls-button-zoom`,onClick:h[1]||(h[1]=e=>d(`resetZoom`)),"data-cy-zoom-reset":``,style:t({color:l.config.style.chart.controls.color,width:l.config.style.chart.controls.fontSize*4+`px`,borderRadius:l.config.style.chart.controls.borderRadius,fontSize:l.config.style.chart.controls.fontSize+`px`,cursor:l.isCursorPointer?`pointer`:`default`})},n(Math.round(l.scale*100))+`% `,5),a(`button`,{onClick:h[2]||(h[2]=e=>d(`zoomIn`)),class:`vue-data-ui-zoom-controls-button`,"data-cy-zoom-in":``,style:t({cursor:l.isCursorPointer?`pointer`:`default`})},[i(f,{name:`zoomPlus`,stroke:l.config.style.chart.controls.color,size:l.config.style.chart.controls.fontSize*1.2},null,8,[`stroke`,`size`])],4),a(`button`,{disabled:l.scale===1,onClick:h[3]||(h[3]=e=>d(`resetZoom`)),class:`vue-data-ui-zoom-controls-button`,style:t({cursor:l.isCursorPointer?`pointer`:`default`})},[i(f,{name:`revert`,stroke:l.config.style.chart.controls.color,size:l.config.style.chart.controls.fontSize*1.2},null,8,[`stroke`,`size`])],12,m),l.withDirection?(s(),o(`button`,{key:0,onClick:h[4]||(h[4]=e=>d(`switchDirection`)),class:`vue-data-ui-zoom-controls-button`,style:t({cursor:l.isCursorPointer?`pointer`:`default`})},[i(f,{name:`direction`,stroke:l.config.style.chart.controls.color,size:l.config.style.chart.controls.fontSize*1.2},null,8,[`stroke`,`size`])],4)):c(``,!0)],6))}},[[`__scopeId`,`data-v-b5d92405`]]);export{h as t};