import{a as e}from"./rolldown-runtime-CNC7AqOf.js";import{t}from"./react-Augu_vA3.js";import{_t as n,st as r}from"./forms-CL2ODv4X.js";import{t as i}from"./useTranslation-B_YCgyrR.js";import{t as a}from"./jsx-runtime-CTknu7_t.js";import{i as o}from"./cards-CR_9H_Xm.js";var s=e(t()),c=e(a());function l(e){let[t]=i(),a=n(),{onSaveClick:l,disableSaveButton:u,label:d,saveButtonLabel:f,disableSaveButtonOnly:p}=e;return(0,c.jsxs)(c.Fragment,{children:[l&&(0,c.jsxs)(`div`,{className:`flex`,children:[(0,c.jsx)(r,{behavior:`button`,className:`rounded-br-none rounded-tr-none px-3`,onClick:l,disabled:u||p,disableWithoutIcon:!0,children:f??t(`save`)}),(0,c.jsx)(o,{className:`rounded-bl-none rounded-tl-none h-full border-l-1 border-y-0 border-r-0`,cardActions:!0,disabled:u,cypressRef:e.cypressRef,labelButtonBorderColor:a.$1,children:e.actions.map((t,n)=>(0,c.jsx)(s.Fragment,{children:t(e.resource)},n))})]}),!l&&d&&(0,c.jsx)(o,{label:e.label,cypressRef:e.cypressRef,children:e.actions.map((t,n)=>(0,c.jsx)(s.Fragment,{children:t(e.resource)},n))})]})}export{l as t};