"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const S=require("react/jsx-runtime"),a=require("react"),M=require("./SystemColors.js"),b=require("./PlainColor.js"),g=require("./ManualColors.js"),m=require("@nivo/colors"),v=require("./SequentialColors.js"),w=require("./CategoricalColors.js");class x extends a.Component{constructor(l){super(l)}render(){const{app:l,type:i,colorBy:s,scheme:e,barColor:C,manualColors:f,locale:u,overallLabel:h,customLabels:q,options:c}=this.props;let o;const{data:r,keys:t,indexBy:n,dimensionsMetadata:d,measuresMetadata:p}=this.props.options;return r?(e==="system"?o=new M.default(l,i,s,e,r,t,n,d,p,u,c):e==="plain_color"?o=new b.default(C):e=="manual"?o=new g.default(l,i,s,e,r,d,p,t,n,f,u,h,q,c):(m.isSequentialColorScheme(e)&&(o=new v.default(s,e,r,t,n)),m.isCategoricalColorScheme(e)&&(o=new w.default(s,e,r,t,n))),S.jsx("div",{children:a.Children.map(this.props.children,y=>a.cloneElement(y,{...this.props,colorGenerator:o}))})):null}}exports.default=x;
