import e from"@babel/runtime/helpers/defineProperty";import r from"@babel/runtime/helpers/objectWithoutProperties";import{makeStyles as t,Accordion as n,AccordionSummary as o,AccordionDetails as i}from"@material-ui/core";import{ExpandMore as c}from"@material-ui/icons";import{jsxs as a,jsx as s}from"react/jsx-runtime";var u=["accordionDetailsRef","children","isAccordionRequired","summary"];function d(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function p(r){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?d(Object(n),!0).forEach((function(t){e(r,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(n,e))}))}return r}var l=t((function(e){return{accordionDetails:{flexDirection:"column",paddingTop:function(e){return e.isAccordionRequired?12:0},paddingLeft:function(e){return e.isAccordionRequired?32:0}},summaryContent:{display:function(e){return e.isAccordionRequired?"block":"none"},fontSize:16,color:e.palette.primary.contrastText},expandIcon:{display:function(e){return e.isAccordionRequired?"block":"none"},"& svg":{width:24,height:24}}}}));function f(e){var t=e.accordionDetailsRef,d=e.children,f=e.isAccordionRequired,m=e.summary,b=r(e,u),y=l({isAccordionRequired:f});return a(n,p(p({},b),{},{children:[s(o,{classes:{content:y.summaryContent,expandIcon:y.expandIcon},expandIcon:s(c,{}),children:m}),s(i,{classes:{root:y.accordionDetails},ref:t,children:d})]}))}export{f as SettingsAccordion};
