import{l as o}from"./locale-wDcg0qDg.js";const p=`Displays a menu, analogous to the micro-lc (version 2.0.0+) menu, which allows to navigate amongst plugins.

> **⚠️ Caution**
> 
> The Layout component is not supported by micro-lc version <2.0.0. micro-lc version 2.0.0+ (or a custom rendering engine) should be used.
`,d=`Questa componente consente di visualizzare un menu, analogo a quello del micro-lc (versione 2.0.0+), che permette di navigare tra i plugin.

> **⚠️ Attenzione**
> 
> Il componente Layout non è supportato da micro-lc versione <2.0.0. È quindi necessario utilizzare micro-lc versione 2.0.0+ (o un motore di rendering personalizzato).
`,a={__mia_configuration:{label:"Badge"},oneOf:[{type:"string"},{type:"object",properties:{url:{__mia_configuration:{label:"URL"},type:"string"},method:{__mia_configuration:{label:"HTTP method"},type:"string",enum:["GET","POST","DELETE","PATCH","PUT"]},body:{__mia_configuration:{label:"Body"},oneOf:[{type:"string"},{type:"object"}]},config:{__mia_configuration:{label:"Configuration"},type:"object"}}}]},m={docLink:"https://docs.mia-platform.eu/docs/microfrontend-composer/back-kit/components/layout",mocks:{fetch:e=>{var n,r,l,s;const u=()=>Promise.resolve(new Response(JSON.stringify({name:"John Doe",image:"https://www.gravatar.com/avatar/?d=identicon"}),{headers:{"Content-Type":"application/json"}})),t=[];if(e.userInfoUrl){const i=e.userInfoUrl;t.push({url:{pathname:i},notify:!0,handler:u})}if((n=e.userMenu)!=null&&n.userInfoUrl){const i=e.userMenu.userInfoUrl;t.push({url:{pathname:i},notify:!0,handler:u})}if((l=(r=e.userMenu)==null?void 0:r.logout)!=null&&l.url){const i=e.userMenu.logout.url,c=(s=e.userMenu.logout.method)!=null?s:"GET";t.push({url:{pathname:i},method:c,notify:!0,handler:()=>Promise.resolve(new Response(null,{status:204}))})}return t}},example:JSON.stringify({tag:"bk-layout",properties:{menuItems:[{id:"orders",label:{en:"Orders",it:"Ordini"},type:"application"},{id:"riders",label:{en:"Riders",it:"Rider"},type:"application"}]}}),definitions:{application:{type:"object",required:["id","type"],properties:{icon:{__mia_configuration:{"schema-hint":"dynamic-icon",label:"Icon"}},id:{type:"string",__mia_configuration:{label:"Id"}},label:{__mia_configuration:{"schema-hint":"localized-text",label:"Label"}},selectedAlsoOn:{type:"array",items:{type:"string"},__mia_configuration:{label:"Selected Also On"}},badge:a,tags:{type:"array",items:{type:"string"},__mia_configuration:{label:"Tags",description:"Values used for finding this item during menu items search"}},type:{const:"application",__mia_configuration:{label:"Type"}}}},category:{type:"object",required:["id","type"],properties:{icon:{__mia_configuration:{"schema-hint":"dynamic-icon",label:"Icon"}},id:{type:"string",__mia_configuration:{label:"Id"}},label:{__mia_configuration:{"schema-hint":"localized-text",label:"Label"}},children:{__mia_configuration:{label:"Children",arrayVisualization:{type:"table",configuration:{columns:["label","type"]}}},type:"array",items:{$ref:"#/definitions/menuItem"}},badge:a,tags:{type:"array",items:{type:"string"},__mia_configuration:{label:"Tags",description:"Values used for finding this item during menu items search"}},type:{const:"category",__mia_configuration:{label:"Type"}}}},menuItem:{type:"object",__mia_configuration:{oneOfGuard:"type",oneOfDefault:0},oneOf:[{$ref:"#/definitions/application"},{$ref:"#/definitions/category"},{$ref:"#/definitions/href"},{$ref:"#/definitions/group"}]},href:{type:"object",required:["id","href","type"],properties:{href:{type:"string",__mia_configuration:{label:"Href"}},icon:{__mia_configuration:{"schema-hint":"dynamic-icon",label:"Icon"}},id:{type:"string",__mia_configuration:{label:"Id"}},label:{__mia_configuration:{"schema-hint":"localized-text",label:"Label"}},target:{__mia_configuration:{label:"Target"},type:"string",enum:["_blank","_self","_parent","_top"]},badge:a,tags:{type:"array",items:{type:"string"},__mia_configuration:{label:"Tags",description:"Values used for finding this item during menu items search"}},type:{const:"href",__mia_configuration:{label:"Type"}}}},group:{type:"object",required:["id","type"],properties:{id:{type:"string",__mia_configuration:{label:"Id"}},label:{__mia_configuration:{"schema-hint":"localized-text",label:"Label"}},icon:{__mia_configuration:{"schema-hint":"dynamic-icon",label:"Icon"}},children:{__mia_configuration:{label:"Children",arrayVisualization:{type:"table",configuration:{columns:["label","type"]}}},type:"array",items:{$ref:"#/definitions/menuItem"}},badge:a,tags:{type:"array",items:{type:"string"},__mia_configuration:{label:"Tags",description:"Values used for finding this item during menu items search"}},type:{const:"group",__mia_configuration:{label:"Type"}}}}},label:"Layout",descriptionLong:{en:p,it:d},type:"layout",properties:{userInfoUrl:{type:"string",__mia_configuration:{priority:"high",attribute:"user-info-url",label:"User Info Url",description:"URL called in GET to retrieve user data"}},mode:{__mia_configuration:{label:"Visualization Mode",description:"Instructs the layout on whether to include an aside bar",priority:"high",attribute:"mode",enumLabels:{fixedSideBar:"Fixed Sidebar",overlaySideBar:"Overlay Sidebar",topBar:"Top Bar",leftMenu:"Left Menu"}},type:"string",default:"overlaySideBar",enum:["fixedSideBar","overlaySideBar","topBar","leftMenu"]},logo:{__mia_configuration:{priority:"high",attribute:!1,label:"Logo",description:"Top right logo image source/url and alternative text"},type:"object",properties:{altText:{__mia_configuration:{label:"Alternative Text",description:"Text to be displayed when image is not available"},type:"string"},onClickHref:{__mia_configuration:{label:"On Click Href",description:"URL to reach when logo is clicked"},type:"string"},url:{__mia_configuration:{label:"Url",description:"URL/reference to image asset to display as logo"},oneOf:[{type:"string"},{type:"object",properties:{path:{__mia_configuration:{label:"Path",description:"Path from which to retrieve logo source from current user data"},type:"string"},default:{__mia_configuration:{label:"Default",description:"Logo source to use if unable to retrieve from current user data"},type:"string"}}}]}}},menuItems:{type:"array",items:{$ref:"#/definitions/menuItem"},__mia_configuration:{label:"Menu Items",description:"List of applications and category/groups of applications to be reached by layout menu items",priority:"high",attribute:!1,arrayVisualization:{type:"table",configuration:{columns:["label","type"]}}}},helpMenu:{__mia_configuration:{label:"Help Menu Url",description:"Help page url redirection link",attribute:!1},type:"string"},userMenu:{__mia_configuration:{label:"Login and user context menu",description:"User menu that handles logout action and displays the current user provided by an endpoint",attribute:!1},type:"object",properties:{logout:{__mia_configuration:{priority:"medium",label:"Logout",description:"Configuration needed to perform user logout"},type:"object",properties:{method:{__mia_configuration:{label:"HTTP Method"},type:"string",enum:["GET","POST"]},redirectUrl:{__mia_configuration:{label:"Redirect Url",description:"Redirect URL in case of successful logout"},type:"string"},url:{__mia_configuration:{label:"Logout Endpoint"},type:"string"}}},userInfoUrl:{__mia_configuration:{deprecated:!0,label:"User Context URL"},type:"string"},userPropertiesMapping:{type:"object",__mia_configuration:{label:"Mapping of User Properties"},additionalProperties:{anyOf:[{type:"string"},{type:"string",enum:["name","avatar"]}]}}}},userMenuTrigger:{__mia_configuration:{label:"User menu trigger",description:"Defines how the user menu is triggered",attribute:!1,enumLabels:{hover:"Hover",click:"Click"}},type:"string",enum:["hover","click"],default:"hover"},head:{__mia_configuration:{priority:"low",label:"Head Configuration",description:"Configuration for the HTML document head",attribute:!1},type:"object",properties:{favIconUrl:{type:"string",__mia_configuration:{label:"Fav Icon"}},title:{type:"string",__mia_configuration:{label:"Title"}}}},sideBarWidth:{type:"number",__mia_configuration:{priority:"low",attribute:"side-bar-width",label:"Sidebar Width",description:"Width of the sidebar in pixels, if applicable"}},collapsedWidth:{type:"number",__mia_configuration:{priority:"low",attribute:"collapsed-width",label:"Collapsed Sidebar Width",description:"Width of collapsed sidebar in pixels, if applicable"}},showSearchBar:{__mia_configuration:{priority:"medium",label:"Show search Bar",description:"Whether to show the search bar. Not available for topBar mode",attribute:!1},type:"boolean"},customLocale:{__mia_configuration:{attribute:!1,label:"Custom Locale",description:"Custom localized texts shown as component labels",priority:"low"},type:"object",properties:{logout:o("Logout"),search:o("Search placeholder"),emptyResult:{__mia_configuration:{label:"Empty Search Result"},type:"object",properties:{title:o("Title"),subtitle:o("Subtitle")}}}}}};var g=m;export{g as default};
