/* COPYRIGHT Esri - https://js.arcgis.com/5.0.18/LICENSE.txt */
import t from"../../../core/Collection.js";import i from"./NavigationAction.js";import{loadCalciteComponents as e}from"../../support/componentsUtils.js";import{tsx as c}from"../../support/widget.js";function o(){return e({"action-menu":()=>import("@esri/calcite-components/dist/components/calcite-action-menu"),action:()=>import("@esri/calcite-components/dist/components/calcite-action")})}const n=t.ofType(i);function a(t){const{activeAction:i,actions:e}=t,o=e.length;return 0===o?c("div",{"data-testid":"no-actions",hidden:!0}):o>1?c("calcite-action-menu",{"data-testid":"action-menu",label:t.label,scale:t.scale},c("calcite-action",{active:!!i,"data-testid":"action-menu-trigger",icon:i?.icon??t.icon,slot:"trigger",text:i?.text??t.label,title:i?.title??t.title}),e.items.map(t=>c("calcite-action",{active:t.active,"data-testid":t.uid,disabled:t.disabled,icon:t.icon,key:t.uid,onclick:t.onclick,text:t.text,textEnabled:!0,title:t.title}))):c("calcite-action",{active:e.items[0].active,"data-testid":"action",disabled:e.items[0].disabled,icon:e.items[0].icon,onclick:e.items[0].onclick,text:e.items[0].text,title:e.items[0].title})}export{a as NavigationActions,n as NavigationActionsCollection,o as loadNavigationActionsComponents};
