"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@babel/runtime/helpers/slicedToArray"),t=require("react");function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var u=r(e);exports.useChartTypeSwitch=function(e){var r=e.chart,a=null==r?void 0:r.userOptions.chart.type,n=t.useState(null),c=u.default(n,2),i=c[0],l=c[1];return t.useEffect((function(){i||l(a)}),[a]),{chartType:i,handleChartTypeChange:function(e){l(e),r.update({chart:{type:e}})}}};
