import{cls as e}from"@gem-sdk/core";import{getHiddenOnPageByDevice as s}from"./helpers.js";let generateBreadcrumbClasses=(t,a)=>{let l=s("tablet",t),r=s("mobile",t),i=e({"gp-hidden":t?.desktop&&a?.extendCondition,"tablet:gp-hidden":l&&a?.extendCondition,"tablet:gp-flex":!l,"mobile:gp-hidden":r&&a?.extendCondition,"mobile:gp-flex":!r}),g=`${i} ${a?.additionalStaticClasses}`.trim();return composeClasses(g)},staticFirstClasses=`
    gp-flex gp-flex-wrap gp-align-center gp-w-full
    !gp-gap-x-[var(--gap-desktop)] tablet:!gp-gap-x-[var(--gap-tablet)] mobile:!gp-gap-x-[var(--gap-mobile)]
  `,staticSecondClasses=`
    gp-inline-flex gp-items-center gp-justify-center gp-overflow-hidden
    [&>svg]:!gp-text-[var(--color)] [&>svg]:!gp-h-[var(--height-desktop)]
    [&>svg]:!gp-w-auto tablet:[&>svg]:!gp-h-[var(--height-tablet)]
    mobile:[&>svg]:!gp-h-[var(--height-mobile)]
    `,getBreadcrumbSecondItemClasses=(e,s,t)=>{let a=generateBreadcrumbClasses(s,{indexOffset:e??0,lengthOfBreadcrumb:t,additionalStaticClasses:staticSecondClasses,extendCondition:e+1===t});return a},getBreadcrumbChildItemClasses=(s,t,a)=>{let l=e({"gp-cursor-pointer":s+1!==t},"gp-inline-flex gp-select-none gp-w-fit",a);return{...composeClasses(l)}},getBreadcrumbContainerChildItemClasses=()=>({...composeClasses(e("gp-flex"))}),getBreadcrumbClasses=s=>{let t=e("gp-flex",s);return composeClasses(t)},getNavClasses=()=>composeClasses(staticFirstClasses),composeClasses=e=>e.trim().split(/\s+/).reduce((e,s)=>(e[s]=!0,e),{});export{generateBreadcrumbClasses,getBreadcrumbChildItemClasses,getBreadcrumbClasses,getBreadcrumbContainerChildItemClasses,getBreadcrumbSecondItemClasses,getNavClasses,staticFirstClasses,staticSecondClasses};
