import e from"../../../../@babel/runtime/helpers/esm/objectWithoutProperties.js";import n from"../../../../@babel/runtime/helpers/esm/extends.js";import*as t from"react";import i from"../../../../prop-types/index.js";import r from"../../../../clsx/dist/clsx.m.js";import o from"../styles/withStyles.js";import a from"../utils/requirePropFactory.js";var s=[0,1,2,3,4,5,6,7,8,9,10],c=["auto",!0,1,2,3,4,5,6,7,8,9,10,11,12];function l(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,t=parseFloat(e);return"".concat(t/n).concat(String(e).replace(String(t),"")||"px")}var p=function(e){return n({root:{},container:{boxSizing:"border-box",display:"flex",flexWrap:"wrap",width:"100%"},item:{boxSizing:"border-box",margin:"0"},zeroMinWidth:{minWidth:0},"direction-xs-column":{flexDirection:"column"},"direction-xs-column-reverse":{flexDirection:"column-reverse"},"direction-xs-row-reverse":{flexDirection:"row-reverse"},"wrap-xs-nowrap":{flexWrap:"nowrap"},"wrap-xs-wrap-reverse":{flexWrap:"wrap-reverse"},"align-items-xs-center":{alignItems:"center"},"align-items-xs-flex-start":{alignItems:"flex-start"},"align-items-xs-flex-end":{alignItems:"flex-end"},"align-items-xs-baseline":{alignItems:"baseline"},"align-content-xs-center":{alignContent:"center"},"align-content-xs-flex-start":{alignContent:"flex-start"},"align-content-xs-flex-end":{alignContent:"flex-end"},"align-content-xs-space-between":{alignContent:"space-between"},"align-content-xs-space-around":{alignContent:"space-around"},"justify-xs-center":{justifyContent:"center"},"justify-xs-flex-end":{justifyContent:"flex-end"},"justify-xs-space-between":{justifyContent:"space-between"},"justify-xs-space-around":{justifyContent:"space-around"},"justify-xs-space-evenly":{justifyContent:"space-evenly"}},function(e,n){var t={};return s.forEach((function(i){var r=e.spacing(i);0!==r&&(t["spacing-".concat(n,"-").concat(i)]={margin:"-".concat(l(r,2)),width:"calc(100% + ".concat(l(r),")"),"& > $item":{padding:l(r,2)}})})),t}(e,"xs"),e.breakpoints.keys.reduce((function(t,i){return function(e,t,i){var r={};c.forEach((function(e){var n="grid-".concat(i,"-").concat(e);if(!0!==e)if("auto"!==e){var t="".concat(Math.round(e/12*1e8)/1e6,"%");r[n]={flexBasis:t,flexGrow:0,maxWidth:t}}else r[n]={flexBasis:"auto",flexGrow:0,maxWidth:"none"};else r[n]={flexBasis:0,flexGrow:1,maxWidth:"100%"}})),"xs"===i?n(e,r):e[t.breakpoints.up(i)]=r}(t,e,i),t}),{}))},d=t.forwardRef((function(i,o){var a=i.alignContent,s=void 0===a?"stretch":a,c=i.alignItems,l=void 0===c?"stretch":c,p=i.classes,d=i.className,f=i.component,x=void 0===f?"div":f,m=i.container,g=void 0!==m&&m,u=i.direction,v=void 0===u?"row":u,w=i.item,y=void 0!==w&&w,h=i.justify,b=void 0===h?"flex-start":h,j=i.lg,S=void 0!==j&&j,C=i.md,W=void 0!==C&&C,O=i.sm,z=void 0!==O&&O,I=i.spacing,M=void 0===I?0:I,N=i.wrap,E=void 0===N?"wrap":N,D=i.xl,G=void 0!==D&&D,T=i.xs,k=void 0!==T&&T,B=i.zeroMinWidth,q=void 0!==B&&B,F=e(i,["alignContent","alignItems","classes","className","component","container","direction","item","justify","lg","md","sm","spacing","wrap","xl","xs","zeroMinWidth"]),P=r(p.root,d,g&&[p.container,0!==M&&p["spacing-xs-".concat(String(M))]],y&&p.item,q&&p.zeroMinWidth,"row"!==v&&p["direction-xs-".concat(String(v))],"wrap"!==E&&p["wrap-xs-".concat(String(E))],"stretch"!==l&&p["align-items-xs-".concat(String(l))],"stretch"!==s&&p["align-content-xs-".concat(String(s))],"flex-start"!==b&&p["justify-xs-".concat(String(b))],!1!==k&&p["grid-xs-".concat(String(k))],!1!==z&&p["grid-sm-".concat(String(z))],!1!==W&&p["grid-md-".concat(String(W))],!1!==S&&p["grid-lg-".concat(String(S))],!1!==G&&p["grid-xl-".concat(String(G))]);return t.createElement(x,n({className:P,ref:o},F))}));"production"!==process.env.NODE_ENV&&(d.propTypes={alignContent:i.oneOf(["stretch","center","flex-start","flex-end","space-between","space-around"]),alignItems:i.oneOf(["flex-start","center","flex-end","stretch","baseline"]),children:i.node,classes:i.object.isRequired,className:i.string,component:i.elementType,container:i.bool,direction:i.oneOf(["row","row-reverse","column","column-reverse"]),item:i.bool,justify:i.oneOf(["flex-start","center","flex-end","space-between","space-around","space-evenly"]),lg:i.oneOf([!1,"auto",!0,1,2,3,4,5,6,7,8,9,10,11,12]),md:i.oneOf([!1,"auto",!0,1,2,3,4,5,6,7,8,9,10,11,12]),sm:i.oneOf([!1,"auto",!0,1,2,3,4,5,6,7,8,9,10,11,12]),spacing:i.oneOf(s),wrap:i.oneOf(["nowrap","wrap","wrap-reverse"]),xl:i.oneOf([!1,"auto",!0,1,2,3,4,5,6,7,8,9,10,11,12]),xs:i.oneOf([!1,"auto",!0,1,2,3,4,5,6,7,8,9,10,11,12]),zeroMinWidth:i.bool});var f=o(p,{name:"MuiGrid"})(d);if("production"!==process.env.NODE_ENV){var x=a("Grid");f.propTypes=n({},f.propTypes,{alignContent:x("container"),alignItems:x("container"),direction:x("container"),justify:x("container"),lg:x("item"),md:x("item"),sm:x("item"),spacing:x("container"),wrap:x("container"),xs:x("item"),zeroMinWidth:x("item")})}export default f;export{p as styles};
//# sourceMappingURL=Grid.js.map
