import{r as l,j as e,e as p,M as u,u as f,S as g}from"./index-nedq-V-O.js";import{useMDXComponents as j}from"./index-DUUR9i0P.js";import"./iframe-DonKbGPa.js";import"./index-C__6K5js.js";import"./index-DrFu-skq.js";const w=({mdxPage:t})=>{const[n,o]=l.useState("");return l.useEffect(()=>{o(`## USER EXPERIENCE
`+t)},[t]),e.jsx(p,{children:n})},{addons:y}=__STORYBOOK_MODULE_PREVIEW_API__,m=({type:t})=>{const[n,o]=l.useState(""),[s,a]=l.useState("");return y.getChannel().once("docsRendered",c=>{a(c)}),l.useEffect(()=>{s&&(async()=>{try{const i=await fetch(`docs/${s}-${t}.md`);if(!i.ok)throw new Error(`Errore nel caricamento: ${i.statusText}`);const d=await i.text();o(d)}catch(i){console.error(`Errore nel caricamento del file MDX ${t}:`,i),o(`Errore nel caricamento del contenuto ${t}.`)}})()},[s,t]),e.jsx("div",{className:"panel-content",children:e.jsx(p,{children:n})})},b=()=>e.jsx(m,{type:"top"}),C=()=>e.jsx(m,{type:"down"}),E=({title:t,showCode:n,showAccessibility:o})=>{const s=t.split("/").pop()||t,a=[{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"},o?{href:"#accessibilita",text:"Accessibilità"}:null,n?{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:s}),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:a.map((r,c)=>e.jsxs("li",{style:{display:"flex",alignItems:"center",height:"100%",whiteSpace:"nowrap"},children:[e.jsx("a",{href:r==null?void 0:r.href,target:"_self",style:{fontSize:"1.2em",color:"blue",textDecoration:"none",display:"flex",alignItems:"center",height:"100%"},children:r==null?void 0:r.text}),c<a.length-1&&e.jsx("span",{style:{marginLeft:"10px",whiteSpace:"nowrap"},children:"|"})]},r==null?void 0:r.href))})})]})},D=({note:t,url:n})=>{const a=window.location.origin+"/wk-unico"+n;return!t||t==""?null:e.jsxs(e.Fragment,{children:[e.jsx("h2",{id:"note",children:"Note"}),e.jsx("p",{children:t}),n&&n!==""&&e.jsx("a",{href:a,children:"Vai al link"})]})},M=t=>{var i,d,x;const{story:n}=f("story",["story"]),o=((i=n.parameters.docs)==null?void 0:i.mdxPage)||null,s=((d=n.parameters.docs)==null?void 0:d.showCode)||!1,a=((x=n.parameters.docs)==null?void 0:x.showAccessibility)||!1,r=n.parameters.documentationNote||"",c=n.parameters.documentationUrl||"";return e.jsxs(e.Fragment,{children:[e.jsx(E,{title:n.title,showCode:s,showAccessibility:a}),e.jsx(b,{}),e.jsx(g,{}),e.jsx(C,{}),o&&e.jsx(w,{mdxPage:o}),e.jsx(D,{note:r,url:c})]})};function h(t){return e.jsxs(e.Fragment,{children:[e.jsx(u,{isTemplate:!0}),`
`,`
`,e.jsx(M,{})]})}function T(t={}){const{wrapper:n}={...j(),...t.components};return n?e.jsx(n,{...t,children:e.jsx(h,{...t})}):h()}export{M as Template,T as default};
