import{r as l,j as e,f as x,M as m,u as f,S as u}from"./index-IXryf67I.js";import{useMDXComponents as g}from"./index-CSSx6xBF.js";import"./iframe-DUDISCPl.js";import"./index-C__6K5js.js";import"./index-DrFu-skq.js";const j=({mdxPage:t})=>{const[r,s]=l.useState("");return l.useEffect(()=>{s(`## USER EXPERIENCE
`+t)},[t]),e.jsx(x,{children:r})},{addons:w}=__STORYBOOK_MODULE_PREVIEW_API__,h=({type:t})=>{const[r,s]=l.useState(""),[a,i]=l.useState("");return w.getChannel().once("docsRendered",c=>{i(c)}),l.useEffect(()=>{a&&(async()=>{try{const o=await fetch(`docs/${a}-${t}.md`);if(!o.ok)throw new Error(`Errore nel caricamento: ${o.statusText}`);const p=await o.text();s(p)}catch(o){console.error(`Errore nel caricamento del file MDX ${t}:`,o),s(`Errore nel caricamento del contenuto ${t}.`)}})()},[a,t]),e.jsx("div",{className:"panel-content",children:e.jsx(x,{children:r})})},y=()=>e.jsx(h,{type:"top"}),C=()=>e.jsx(h,{type:"down"}),E=({title:t,showCode:r,showAccessibility:s})=>{const a=t.split("/").pop()||t,i=[{href:"#panoramica",text:"Panoramica"},{href:"#caratteristiche-principali",text:"Caratteristiche Principali"},{href:"#varianti",text:"Varianti"},{href:"#best-practices",text:"Best Practices"},{href:"#componenti-correlati",text:"Componenti Correlati"},s?{href:"#accessibilita",text:"Accessibilità"}:null,r?{href:"#codice",text:"Codice"}:null,{href:"#user-experience",text:"User Experience"}].filter(Boolean);return e.jsxs("div",{style:{width:"auto",minHeight:"128px",backgroundImage:'url("assets/background.png")',backgroundRepeat:"no-repeat",backgroundSize:"cover",backgroundPosition:"right center",borderRadius:"4px",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"flex-start",padding:"32px",boxSizing:"border-box",marginBottom:"5%"},children:[e.jsx("h1",{style:{textAlign:"left",width:"100%",marginBottom:"20px",lineHeight:"1"},children:a}),e.jsx("nav",{style:{width:"100%"},children:e.jsx("ul",{style:{listStyleType:"none",padding:0,flexWrap:"wrap",display:"flex",alignItems:"center",gap:"15px",margin:0},children:i.map((n,c)=>e.jsxs("li",{style:{display:"flex",alignItems:"center",height:"100%",whiteSpace:"nowrap"},children:[e.jsx("a",{href:n==null?void 0:n.href,target:"_self",style:{fontSize:"1.2em",color:"blue",textDecoration:"none",display:"flex",alignItems:"center",height:"100%"},children:n==null?void 0:n.text}),c<i.length-1&&e.jsx("span",{style:{marginLeft:"10px",whiteSpace:"nowrap"},children:"|"})]},n==null?void 0:n.href))})})]})},b=t=>{var n,c,o;const{story:r}=f("story",["story"]),s=((n=r.parameters.docs)==null?void 0:n.mdxPage)||null,a=((c=r.parameters.docs)==null?void 0:c.showCode)||!1,i=((o=r.parameters.docs)==null?void 0:o.showAccessibility)||!1;return e.jsxs(e.Fragment,{children:[e.jsx(E,{title:r.title,showCode:a,showAccessibility:i}),e.jsx(y,{}),e.jsx(u,{}),e.jsx(C,{}),s&&e.jsx(j,{mdxPage:s})]})};function d(t){return e.jsxs(e.Fragment,{children:[e.jsx(m,{isTemplate:!0}),`
`,`
`,e.jsx(b,{})]})}function _(t={}){const{wrapper:r}={...g(),...t.components};return r?e.jsx(r,{...t,children:e.jsx(d,{...t})}):d()}export{b as Template,_ as default};
