import{a as c}from"./Utilities-CQhZFhp5.js";const d=e=>e.map(i=>`<li><span aria-hidden="true" tabindex="-1" class="fa fa-solid ${i.icon}"></span><a href="${i.href}" class="inail-text-link-1 m-0">${i.label}</a></li>`).join(`
`),v=e=>e.map(i=>`<li class="p-0"><span class="sidebarLinks"><a href="${i.href}">${i.label}</a></span></li>`).join(`
`),p=(e,i)=>i.map((l,o)=>l.child&&l.child.length>0?`<li ${l.active?'class="selected"':""}>
        <button class="inail-menu-container" data-toggle="collapse" data-target="#${e}-item-${o}" aria-expanded="${l.open?"true":"false"}"">
            <span class="inail-menu-level-1">${l.label}</span>
            <span class="btn btn-link sub-tree-toggle"></span>
        </button>
        <ul class="livello_2 inail-menu-level-2 collapse ${l.open?"in":""}" id="${e}-item-${o}" role="list">

        ${l.child.map(a=>`<li ${a.active?'class="selected"':""}>
                <div class="inail-menu-container">
                    <a href="${a.href}">${a.label}</a>
                </div>
            </li>`).join(`
`)}

        </ul>
      </li>`:`<li>
        <div class="inail-menu-container">
            <a class="livello_1 inail-menu-level-1" href="${l.href}">${l.label}</a>
        </div>
      </li>`).join(`
`);function u(e,i,l,o,a){return`
 <a href="#inail-intranet-toggle-btn"
   class="sr-only sr-only-focusable inail-skip-link inail-text-link-1 mb-4 "
   
   title="Vai direttamente al menù"
   data-target="#inail-intranet-toggle-btn">
   Vai al menù
</a>

<a href="#contenutoPrincipale"
   class="sr-only sr-only-focusable inail-skip-link inail-text-link-1 mb-4 "
   title="Vai direttamente al contenuto principale"
   data-target="#contenutoPrincipale">
   Vai al main
</a>
 <div class="row" >
  <div class="col-xs-12 p-0 inail-intranet-menu-container">
    <button id="inail-intranet-toggle-btn" class="inail-intranet-menu-toggle-btn me-2"
            aria-expanded="false"
            aria-controls="inail-intranet-secondary-nav"
            aria-label="Apri il menu dell'applicativo">
      <span class="inail-intranet-icon fa fa-bars active" aria-hidden="true"></span>
      <span class="inail-intranet-icon fa fa-times" aria-hidden="true"></span>
    </button>
    <a href="#" class="inail-intranet-menu-toggle-btn">
      <span class="inail-intranet-icon active fa-solid fa-house"></span>
    </a>
  </div>
</div>

<div class="row">
  <div id="inail-intranet-aside-menu" class="p-0 col-md-3 col-lg-3 col-sm-5 col-xs-9 hidden" aria-hidden="true">

     <nav id="navigazionesecondaria" aria-label="Menù dell'applicativo" class="col-xs-12 col-sm-12 col-lg-12 col-md-12 filtro">
        <div class="box-menu-contestuale servizi-online-primo-livello">
            <section id="sidebar-superiore">
                <div class="panel-heading menu">
                    <div class="sidebar-superiore-title inail-sidebar-superiore-title inail-vertical-menu-title">${e}</div>
                </div>
                <ul role="list" class="inail-menu-divider">
                    ${p("first-menu",l)}
                </ul>
                <ul class="fa-ul miniMenuIcon pl-0" role="list" aria-label="Utilizzo dell'applicativo">
                    ${d(i)}
                </ul>
            </section>
            <section id="sidebar-inferiore" aria-labelledby="sezione-inferiore">
                <div id="sezione-inferiore" class="pb-4 inail-mat-sezione-inferiore-title">${o}</div>
                <ul role="list">
                    ${v(a)}
                </ul>
            </section>
        </div>
    </nav>
</div>
  

  <div id="inail-intranet-main-menu" class="p-0 col-md-12 col-lg-12">
    <main id="contenutoPrincipale" class="p-0 bg-danger col-xs-12 col-sm-12 col-md-12 col-lg-12" >
    
    </main>
  </div>
</div>
`}const f={title:"Patterns/Skip Link menù",decorators:[(e,i)=>c(e,i,1,["static-webkit/js/custom-webkit.js","static/js/main.js"],!1),e=>`${e()}`]},n={name:"Skip Link menù",argTypes:{titolo:{control:"text",description:"Titolo della menu.",table:{defaultValue:{summary:"Titolo"}}},links:{control:"object",description:"Elenco dei link nella sezione media del menu."},menuItems:{control:"object",description:"Elenco delle voci del menu."},titoloInferiore:{control:"text",description:"Titolo della sezione inferiore del menu.",table:{defaultValue:{summary:"Titolo inferiore"}}},linkInferiori:{control:"object",description:"Elenco di link nella sezione inferiore del menu."}},args:{titolo:"Titolo",links:[{label:"Consulta le FAQ",href:"javascript:void(0)",icon:"fa-circle-question"},{label:"Manuali operativi",href:"javascript:void(0)",icon:"fa-book"},{label:"Scarica elemento",href:"javascript:void(0)",icon:"fa-download"}],menuItems:[{label:"Primo livello",active:!0,open:!0,child:[{label:"Secondo livello",href:"javascript:void(0)",child:[]},{label:"Secondo livello",href:"javascript:void(0)",child:[],active:!0},{label:"Secondo livello",href:"javascript:void(0)",child:[]}]},{label:"Primo livello",href:"javascript:void(0)",child:[]},{label:"Primo livello",href:"javascript:void(0)",child:[]},{label:"Primo livello",child:[{label:"Secondo livello",href:"javascript:void(0)",child:[]},{label:"Secondo livello",href:"javascript:void(0)",child:[]}]},{label:"Primo livello",child:[{label:"Secondo livello",href:"javascript:void(0)",child:[]},{label:"Secondo livello",href:"javascript:void(0)",child:[]},{label:"Secondo livello",href:"javascript:void(0)",child:[]},{label:"Secondo livello",href:"javascript:void(0)",child:[]},{label:"Secondo livello",href:"javascript:void(0)",child:[]},{label:"Secondo livello",href:"javascript:void(0)",child:[]}]}],titoloInferiore:"Titolo inferiore",linkInferiori:[{label:"Lorem ipsum dolor sit amet",href:"javascript:void(0)"},{label:"Lorem ipsum dolor sit amet",href:"javascript:void(0)"},{label:"Lorem ipsum dolor sit amet",href:"javascript:void(0)"}]},render:e=>u(e.titolo,e.links,e.menuItems,e.titoloInferiore,e.linkInferiori)};var r,t,s;n.parameters={...n.parameters,docs:{...(r=n.parameters)==null?void 0:r.docs,source:{originalSource:`{
  name: "Skip Link menù",
  argTypes: {
    titolo: {
      control: 'text',
      description: "Titolo della menu.",
      table: {
        defaultValue: {
          summary: "Titolo"
        }
      }
    },
    links: {
      control: 'object',
      description: "Elenco dei link nella sezione media del menu."
    },
    menuItems: {
      control: 'object',
      description: "Elenco delle voci del menu."
    },
    titoloInferiore: {
      control: 'text',
      description: "Titolo della sezione inferiore del menu.",
      table: {
        defaultValue: {
          summary: "Titolo inferiore"
        }
      }
    },
    linkInferiori: {
      control: 'object',
      description: "Elenco di link nella sezione inferiore del menu."
    }
  },
  args: {
    titolo: 'Titolo',
    links: [{
      label: "Consulta le FAQ",
      href: "javascript:void(0)",
      icon: "fa-circle-question"
    }, {
      label: "Manuali operativi",
      href: "javascript:void(0)",
      icon: "fa-book"
    }, {
      label: "Scarica elemento",
      href: "javascript:void(0)",
      icon: "fa-download"
    }],
    menuItems: [{
      label: "Primo livello",
      active: true,
      open: true,
      child: [{
        label: "Secondo livello",
        href: "javascript:void(0)",
        child: []
      }, {
        label: "Secondo livello",
        href: "javascript:void(0)",
        child: [],
        active: true
      }, {
        label: "Secondo livello",
        href: "javascript:void(0)",
        child: []
      }]
    }, {
      label: "Primo livello",
      href: "javascript:void(0)",
      child: []
    }, {
      label: "Primo livello",
      href: "javascript:void(0)",
      child: []
    }, {
      label: "Primo livello",
      child: [{
        label: "Secondo livello",
        href: "javascript:void(0)",
        child: []
      }, {
        label: "Secondo livello",
        href: "javascript:void(0)",
        child: []
      }]
    }, {
      label: "Primo livello",
      child: [{
        label: "Secondo livello",
        href: "javascript:void(0)",
        child: []
      }, {
        label: "Secondo livello",
        href: "javascript:void(0)",
        child: []
      }, {
        label: "Secondo livello",
        href: "javascript:void(0)",
        child: []
      }, {
        label: "Secondo livello",
        href: "javascript:void(0)",
        child: []
      }, {
        label: "Secondo livello",
        href: "javascript:void(0)",
        child: []
      }, {
        label: "Secondo livello",
        href: "javascript:void(0)",
        child: []
      }]
    }],
    titoloInferiore: 'Titolo inferiore',
    linkInferiori: [{
      label: "Lorem ipsum dolor sit amet",
      href: "javascript:void(0)"
    }, {
      label: "Lorem ipsum dolor sit amet",
      href: "javascript:void(0)"
    }, {
      label: "Lorem ipsum dolor sit amet",
      href: "javascript:void(0)"
    }]
  },
  render: (args: any) => {
    return createSkipLinkMenu(args.titolo, args.links, args.menuItems, args.titoloInferiore, args.linkInferiori);
  }
}`,...(s=(t=n.parameters)==null?void 0:t.docs)==null?void 0:s.source}}};const b=["SkipLinkMenu"];export{n as SkipLinkMenu,b as __namedExportsOrder,f as default};
