@anoki/fse-ui
Version:
FSE UI components library
3 lines (2 loc) • 2.62 kB
JavaScript
;Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('./sections/Services/Services.css');const s=require("./index.cjs237.js"),d=require("./index.cjs123.js"),j=require("./index.cjs239.js"),a=require("./index.cjs240.js"),v=require("react"),E=require("./index.cjs143.js");;/* empty css */const g=require("./index.cjs61.js"),R=require("./index.cjs25.js"),S=require("./index.cjs36.js"),r={LayoutOne:"LayoutOne",LayoutTwo:"LayoutTwo",LayoutThree:"LayoutThree",LayoutFour:"LayoutFour",LayoutFive:"LayoutFive"},T=({title:i,description:L,goToLabel:l,href:x,asLink:y="a",items:o,layout:n=r.LayoutOne,className:p})=>{const h=(e=>{switch(e){case r.LayoutOne:return"ui-service-items-layout-one";case r.LayoutTwo:return"ui-service-items-layout-two";case r.LayoutThree:return"ui-service-items-layout-three";case r.LayoutFour:return"ui-service-items-layout-four";case r.LayoutFive:return"ui-service-items-layout-five";default:return""}})(n),u=v.useMemo(()=>{switch(n){case r.LayoutOne:return o.map(e=>({...a.lodashExports.omit(e,["image"])}));case r.LayoutTwo:return o.map((e,t)=>{const c=t!==1;return{...a.lodashExports.omit(e,c?["image"]:[])}});case r.LayoutThree:return o.map(e=>({...a.lodashExports.omit(e,["image"])}));case r.LayoutFour:return o.map((e,t)=>{const c=t!==0;return{...a.lodashExports.omit(e,c?["image"]:[])}});case r.LayoutFive:return o.map(e=>({...a.lodashExports.omit(e,["image"])}));default:return o}},[o,n]);return s.jsxRuntimeExports.jsxs(d.Section,{className:j.clsx("base-col ui-service-items-section",p),children:[s.jsxRuntimeExports.jsx(g.Col,{className:"ui-service-items-sectirron-content",children:s.jsxRuntimeExports.jsx(d.SectionHeading,{fs:"2",mdFs:"2",className:"ui-service-items-section-title",titleMarginBottom:"mb-x0",descriptionMarginBottom:"mb-x0",color:"slate-20",title:i,description:s.jsxRuntimeExports.jsx(E.RichText,{description:L}),children:l&&x&&s.jsxRuntimeExports.jsx(R.ArrowLink,{href:x,asLink:y,fs:"7",children:l.toUpperCase()})})}),s.jsxRuntimeExports.jsx("ul",{role:"list","aria-label":`Lista di ${i}`,className:`list-style-none ${h}`,children:u==null?void 0:u.map((e,t)=>s.jsxRuntimeExports.jsx("li",{children:s.jsxRuntimeExports.jsx(S.CardCategory,{title:e==null?void 0:e.name,description:e==null?void 0:e.description,image:e==null?void 0:e.image,href:(e==null?void 0:e.link)||(e==null?void 0:e.externalLink),showIcon:e==null?void 0:e.externalLink,asLink:y,isExternal:e==null?void 0:e.externalLink},[e._id,t].join("-"))},[e._id,t].join("-")))})]})};exports.SERVICES_LAYOUTS=r;exports.Services=T;
//# sourceMappingURL=index.cjs144.js.map