import{r as e,s as n,b as s,u as t,e as r,j as a,M as o,ab as l,c as i,O as u,t as c,ah as d,x as p,a8 as h,A as j,ai as m,aj as b,ak as f,Z as v,_ as q,a0 as x,a1 as g,a2 as w,ad as y,a5 as k,F as _,N as C,T as $,G as A,n as R,al as S,am as E,an as I,ao as T,ap as D,aq as z,ar as L,as as U,at as P,au as V,av as B,aw as F,ax as N,Y as W,ay as H,az as K,J as M,aA as O}from"shared";const J={ACTIVE:"active",APPROVED:"approved",REJECTED:"rejected",WITHDRAWN:"withdrawn"},Y=n.div`
  display: flex;
  gap: ${e=>17*e.theme.space.base}px; /* 68px */
  align-items: flex-end;

  @media (max-width: ${e=>e.theme.breakpoints.md}) {
    flex-direction: column;
    align-items: normal;
    gap: ${e=>4*e.theme.space.base}px; /* 16px */
  }
`,G=n(s)`
  flex: 3;
`,X=n(s)`
  flex: 1;
`;var Z=e.memo((function({approvalRequestStatus:n,setApprovalRequestStatus:s,setSearchTerm:c}){const{t:d}=t(),p=e.useCallback((e=>{switch(e){case"any":return d("approval-requests.list.status-dropdown.any","Any");case"active":return d("approval-requests.status.decision-pending","Decision pending");case"approved":return d("approval-requests.status.approved","Approved");case"rejected":return d("approval-requests.status.denied","Denied");case"withdrawn":return d("approval-requests.status.withdrawn","Withdrawn")}}),[d]),h=e.useCallback((e=>{e.selectionValue&&(s(e.selectionValue),c(""))}),[s,c]),j=e.useMemo((()=>r((e=>c(e)),300)),[c]),m=e.useCallback((e=>{j(e.target.value)}),[j]);return a.jsxs(Y,{children:[a.jsxs(G,{children:[a.jsx(G.Label,{hidden:!0,children:d("approval-requests.list.search-placeholder","Search approval requests")}),a.jsx(o,{start:a.jsx(l,{}),placeholder:d("approval-requests.list.search-placeholder","Search approval requests"),onChange:m})]}),a.jsxs(X,{children:[a.jsx(X.Label,{children:d("approval-requests.list.status-dropdown.label_v2","Status")}),a.jsxs(i,{isEditable:!1,onChange:h,selectionValue:n,inputValue:p(n),children:[a.jsx(u,{value:"any",label:d("approval-requests.list.status-dropdown.any","Any")}),a.jsx(u,{value:J.ACTIVE,label:d("approval-requests.status.decision-pending","Decision pending")}),a.jsx(u,{value:J.APPROVED,label:d("approval-requests.status.approved","Approved")}),a.jsx(u,{value:J.REJECTED,label:d("approval-requests.status.denied","Denied")}),a.jsx(u,{value:J.WITHDRAWN,label:d("approval-requests.status.withdrawn","Withdrawn")})]})]})]})}));const Q={hue:"grey",label:"Unknown status"};var ee=e.memo((function({status:e}){const{t:n}=t(),s={[J.ACTIVE]:{hue:"blue",label:n("approval-requests.status.decision-pending","Decision pending")},[J.APPROVED]:{hue:"green",label:n("approval-requests.status.approved","Approved")},[J.REJECTED]:{hue:"red",label:n("approval-requests.status.denied","Denied")},[J.WITHDRAWN]:{hue:"grey",label:n("approval-requests.status.withdrawn","Withdrawn")}}[e]||Q;return a.jsx(c,{hue:s.hue,children:a.jsx(d,{children:s.label})})}));const ne=(e,n,s="short")=>{const t=new Date(e);return`${t.toLocaleDateString(n,{month:s,day:"numeric",year:"numeric"})} ${t.toLocaleTimeString(n,{hour:"2-digit",minute:"2-digit",hour12:!1})}`},se=n(h)`
  color: ${({theme:e})=>p({theme:e,hue:"grey",shade:600})};
`;var te=e.memo((function(){const{t:e}=t();return a.jsx(se,{children:e("approval-requests.list.no-requests","No approval requests found.")})}));const re=n(j)`
  &:visited {
    color: ${({theme:e})=>p({theme:e,hue:"blue",shade:600})};
  }
`,ae={style:{paddingTop:"22px",paddingBottom:"22px"},isTruncated:!0};var oe=e.memo((function({approvalRequests:e,helpCenterPath:n,baseLocale:s,sortDirection:r,onSortChange:o}){const{t:l}=t();return a.jsxs(m,{size:"large",children:[a.jsx(m.Head,{children:a.jsxs(m.HeaderRow,{children:[a.jsx(m.HeaderCell,{width:"40%",isTruncated:!0,children:l("approval-requests.list.table.subject","Subject")}),a.jsx(m.HeaderCell,{isTruncated:!0,children:l("approval-requests.list.table.requester","Requester")}),a.jsx(m.HeaderCell,{isTruncated:!0,children:l("approval-requests.list.table.sent-by","Sent by")}),a.jsx(m.SortableCell,{onClick:()=>{o("asc"===r?"desc":"desc"===r?void 0:"asc")},sort:r,cellProps:ae,children:l("approval-requests.list.table.sent-on","Sent on")}),a.jsx(m.HeaderCell,{isTruncated:!0,children:l("approval-requests.list.table.approval-status","Approval status")})]})}),a.jsx(m.Body,{children:0===e.length?a.jsx(m.Row,{children:a.jsx(m.Cell,{colSpan:5,children:a.jsx(te,{})})}):e.map((e=>a.jsxs(m.Row,{children:[a.jsx(m.Cell,{isTruncated:!0,children:a.jsx(re,{href:`${n}/approval_requests/${e.id}`,children:e.subject})}),a.jsx(m.Cell,{isTruncated:!0,children:e.requester_name}),a.jsx(m.Cell,{isTruncated:!0,children:e.created_by_name}),a.jsx(m.Cell,{isTruncated:!0,children:ne(e.created_at,s)}),a.jsx(m.Cell,{isTruncated:!0,children:a.jsx(ee,{status:e.status})})]},e.id)))})]})}));const le=n.div`
  display: flex;
  flex-direction: column;
  gap: ${e=>e.theme.space.lg};
  margin-top: ${e=>e.theme.space.xl}; /* 40px */
`,ie=n.div`
  display: flex;
  justify-content: center;
  align-items: center;
`;var ue=e.memo((function({baseLocale:n,helpCenterPath:s}){const{t:r}=t(),[o,l]=e.useState(""),[i,u]=e.useState(void 0),{approvalRequests:c,errorFetchingApprovalRequests:d,approvalRequestStatus:p,setApprovalRequestStatus:h,isLoading:j}=function(){const[n,s]=e.useState([]),[t,r]=e.useState(null),[a,o]=e.useState(!1),[l,i]=e.useState("any");return e.useEffect((()=>{(async()=>{o(!0);try{const e=await fetch("/api/v2/users/me.json");if(!e.ok)throw new Error("Error fetching current user data");const n=await e.json(),t="01JJQFNX5ADZ6PRQCFWRDNKZRD",r=await fetch(`/api/v2/approval_workflow_instances/${t}/approval_requests/search${"any"===l?"":`?status=${l}`}`,{method:"POST",headers:{"Content-Type":"application/json","X-CSRF-Token":n.user.authenticity_token}});if(!r.ok)throw new Error("Error fetching approval requests");{const e=await r.json();s(e.approval_requests)}}catch(e){r(e)}finally{o(!1)}})()}),[l]),{approvalRequests:n,errorFetchingApprovalRequests:t,approvalRequestStatus:l,setApprovalRequestStatus:i,isLoading:a}}(),m=e.useMemo((()=>{let e=[...c];if(o){const n=o.toLowerCase();e=e.filter((e=>e.subject.toLowerCase().includes(n)))}return i&&e.sort(((e,n)=>{const s=new Date(e.created_at).getTime(),t=new Date(n.created_at).getTime();return"asc"===i?s-t:t-s})),e}),[c,o,i]);if(d)throw d;return j?a.jsx(ie,{children:a.jsx(b,{size:"64"})}):a.jsxs(le,{children:[a.jsx(f,{isBold:!0,children:r("approval-requests.list.header","Approval requests")}),a.jsx(Z,{approvalRequestStatus:p,setApprovalRequestStatus:h,setSearchTerm:l}),0===c.length?a.jsx(te,{}):a.jsx(oe,{approvalRequests:m,baseLocale:n,helpCenterPath:s,sortDirection:i,onSortChange:u})]})}));async function ce(e,n,s,t){const{baseLocale:r}=s;v(r),await q(r,[()=>function(e){switch(e){case"./translations/locales/af.json":return import("approval-requests-translations").then((function(e){return e.a}));case"./translations/locales/ar-x-pseudo.json":return import("approval-requests-translations").then((function(e){return e.b}));case"./translations/locales/ar.json":return import("approval-requests-translations").then((function(e){return e.c}));case"./translations/locales/az.json":return import("approval-requests-translations").then((function(e){return e.d}));case"./translations/locales/be.json":return import("approval-requests-translations").then((function(e){return e.e}));case"./translations/locales/bg.json":return import("approval-requests-translations").then((function(e){return e.f}));case"./translations/locales/bn.json":return import("approval-requests-translations").then((function(e){return e.g}));case"./translations/locales/bs.json":return import("approval-requests-translations").then((function(e){return e.h}));case"./translations/locales/ca.json":return import("approval-requests-translations").then((function(e){return e.i}));case"./translations/locales/cs.json":return import("approval-requests-translations").then((function(e){return e.j}));case"./translations/locales/cy.json":return import("approval-requests-translations").then((function(e){return e.k}));case"./translations/locales/da.json":return import("approval-requests-translations").then((function(e){return e.l}));case"./translations/locales/de-de.json":return import("approval-requests-translations").then((function(e){return e.m}));case"./translations/locales/de-x-informal.json":return import("approval-requests-translations").then((function(e){return e.n}));case"./translations/locales/de.json":return import("approval-requests-translations").then((function(e){return e.o}));case"./translations/locales/el.json":return import("approval-requests-translations").then((function(e){return e.p}));case"./translations/locales/en-001.json":return import("approval-requests-translations").then((function(e){return e.q}));case"./translations/locales/en-150.json":return import("approval-requests-translations").then((function(e){return e.r}));case"./translations/locales/en-au.json":return import("approval-requests-translations").then((function(e){return e.s}));case"./translations/locales/en-ca.json":return import("approval-requests-translations").then((function(e){return e.t}));case"./translations/locales/en-gb.json":return import("approval-requests-translations").then((function(e){return e.u}));case"./translations/locales/en-my.json":return import("approval-requests-translations").then((function(e){return e.v}));case"./translations/locales/en-ph.json":return import("approval-requests-translations").then((function(e){return e.w}));case"./translations/locales/en-se.json":return import("approval-requests-translations").then((function(e){return e.x}));case"./translations/locales/en-us.json":return import("approval-requests-translations").then((function(e){return e.y}));case"./translations/locales/en-x-dev.json":return import("approval-requests-translations").then((function(e){return e.z}));case"./translations/locales/en-x-keys.json":return import("approval-requests-translations").then((function(e){return e.A}));case"./translations/locales/en-x-obsolete.json":return import("approval-requests-translations").then((function(e){return e.B}));case"./translations/locales/en-x-pseudo.json":return import("approval-requests-translations").then((function(e){return e.C}));case"./translations/locales/en-x-test.json":return import("approval-requests-translations").then((function(e){return e.D}));case"./translations/locales/es-419.json":return import("approval-requests-translations").then((function(e){return e.E}));case"./translations/locales/es-ar.json":return import("approval-requests-translations").then((function(e){return e.F}));case"./translations/locales/es-cl.json":return import("approval-requests-translations").then((function(e){return e.G}));case"./translations/locales/es-es.json":return import("approval-requests-translations").then((function(e){return e.H}));case"./translations/locales/es-mx.json":return import("approval-requests-translations").then((function(e){return e.I}));case"./translations/locales/es-pe.json":return import("approval-requests-translations").then((function(e){return e.J}));case"./translations/locales/es.json":return import("approval-requests-translations").then((function(e){return e.K}));case"./translations/locales/et.json":return import("approval-requests-translations").then((function(e){return e.L}));case"./translations/locales/eu.json":return import("approval-requests-translations").then((function(e){return e.M}));case"./translations/locales/fa-af.json":return import("approval-requests-translations").then((function(e){return e.N}));case"./translations/locales/fa.json":return import("approval-requests-translations").then((function(e){return e.O}));case"./translations/locales/fi.json":return import("approval-requests-translations").then((function(e){return e.P}));case"./translations/locales/fil.json":return import("approval-requests-translations").then((function(e){return e.Q}));case"./translations/locales/fo.json":return import("approval-requests-translations").then((function(e){return e.R}));case"./translations/locales/fr-ca.json":return import("approval-requests-translations").then((function(e){return e.S}));case"./translations/locales/fr-dz.json":return import("approval-requests-translations").then((function(e){return e.T}));case"./translations/locales/fr-mu.json":return import("approval-requests-translations").then((function(e){return e.U}));case"./translations/locales/fr.json":return import("approval-requests-translations").then((function(e){return e.V}));case"./translations/locales/ga.json":return import("approval-requests-translations").then((function(e){return e.W}));case"./translations/locales/he.json":return import("approval-requests-translations").then((function(e){return e.X}));case"./translations/locales/hi.json":return import("approval-requests-translations").then((function(e){return e.Y}));case"./translations/locales/hr.json":return import("approval-requests-translations").then((function(e){return e.Z}));case"./translations/locales/hu.json":return import("approval-requests-translations").then((function(e){return e._}));case"./translations/locales/hy.json":return import("approval-requests-translations").then((function(e){return e.$}));case"./translations/locales/id.json":return import("approval-requests-translations").then((function(e){return e.a0}));case"./translations/locales/is.json":return import("approval-requests-translations").then((function(e){return e.a1}));case"./translations/locales/it-ch.json":return import("approval-requests-translations").then((function(e){return e.a2}));case"./translations/locales/it.json":return import("approval-requests-translations").then((function(e){return e.a3}));case"./translations/locales/ja.json":return import("approval-requests-translations").then((function(e){return e.a4}));case"./translations/locales/ka.json":return import("approval-requests-translations").then((function(e){return e.a5}));case"./translations/locales/kk.json":return import("approval-requests-translations").then((function(e){return e.a6}));case"./translations/locales/kl-dk.json":return import("approval-requests-translations").then((function(e){return e.a7}));case"./translations/locales/km.json":return import("approval-requests-translations").then((function(e){return e.a8}));case"./translations/locales/ko.json":return import("approval-requests-translations").then((function(e){return e.a9}));case"./translations/locales/ku.json":return import("approval-requests-translations").then((function(e){return e.aa}));case"./translations/locales/ky.json":return import("approval-requests-translations").then((function(e){return e.ab}));case"./translations/locales/lt.json":return import("approval-requests-translations").then((function(e){return e.ac}));case"./translations/locales/lv.json":return import("approval-requests-translations").then((function(e){return e.ad}));case"./translations/locales/mk.json":return import("approval-requests-translations").then((function(e){return e.ae}));case"./translations/locales/mn.json":return import("approval-requests-translations").then((function(e){return e.af}));case"./translations/locales/ms.json":return import("approval-requests-translations").then((function(e){return e.ag}));case"./translations/locales/mt.json":return import("approval-requests-translations").then((function(e){return e.ah}));case"./translations/locales/my.json":return import("approval-requests-translations").then((function(e){return e.ai}));case"./translations/locales/ne.json":return import("approval-requests-translations").then((function(e){return e.aj}));case"./translations/locales/nl-be.json":return import("approval-requests-translations").then((function(e){return e.ak}));case"./translations/locales/nl.json":return import("approval-requests-translations").then((function(e){return e.al}));case"./translations/locales/no.json":return import("approval-requests-translations").then((function(e){return e.am}));case"./translations/locales/pl.json":return import("approval-requests-translations").then((function(e){return e.an}));case"./translations/locales/pt-br.json":return import("approval-requests-translations").then((function(e){return e.ao}));case"./translations/locales/pt.json":return import("approval-requests-translations").then((function(e){return e.ap}));case"./translations/locales/ro-md.json":return import("approval-requests-translations").then((function(e){return e.aq}));case"./translations/locales/ro.json":return import("approval-requests-translations").then((function(e){return e.ar}));case"./translations/locales/ru.json":return import("approval-requests-translations").then((function(e){return e.as}));case"./translations/locales/si.json":return import("approval-requests-translations").then((function(e){return e.at}));case"./translations/locales/sk.json":return import("approval-requests-translations").then((function(e){return e.au}));case"./translations/locales/sl.json":return import("approval-requests-translations").then((function(e){return e.av}));case"./translations/locales/sq.json":return import("approval-requests-translations").then((function(e){return e.aw}));case"./translations/locales/sr-me.json":return import("approval-requests-translations").then((function(e){return e.ax}));case"./translations/locales/sr.json":return import("approval-requests-translations").then((function(e){return e.ay}));case"./translations/locales/sv.json":return import("approval-requests-translations").then((function(e){return e.az}));case"./translations/locales/sw-ke.json":return import("approval-requests-translations").then((function(e){return e.aA}));case"./translations/locales/ta.json":return import("approval-requests-translations").then((function(e){return e.aB}));case"./translations/locales/th.json":return import("approval-requests-translations").then((function(e){return e.aC}));case"./translations/locales/tr.json":return import("approval-requests-translations").then((function(e){return e.aD}));case"./translations/locales/uk.json":return import("approval-requests-translations").then((function(e){return e.aE}));case"./translations/locales/ur-pk.json":return import("approval-requests-translations").then((function(e){return e.aF}));case"./translations/locales/ur.json":return import("approval-requests-translations").then((function(e){return e.aG}));case"./translations/locales/uz.json":return import("approval-requests-translations").then((function(e){return e.aH}));case"./translations/locales/vi.json":return import("approval-requests-translations").then((function(e){return e.aI}));case"./translations/locales/zh-cn.json":return import("approval-requests-translations").then((function(e){return e.aJ}));case"./translations/locales/zh-tw.json":return import("approval-requests-translations").then((function(e){return e.aK}));default:return new Promise((function(n,s){("function"==typeof queueMicrotask?queueMicrotask:setTimeout)(s.bind(null,new Error("Unknown variable dynamic import: "+e)))}))}}(`./translations/locales/${r}.json`),()=>function(e){switch(e){case"../shared/translations/locales/af.json":return import("shared").then((function(e){return e.aB}));case"../shared/translations/locales/ar-x-pseudo.json":return import("shared").then((function(e){return e.aC}));case"../shared/translations/locales/ar.json":return import("shared").then((function(e){return e.aD}));case"../shared/translations/locales/az.json":return import("shared").then((function(e){return e.aE}));case"../shared/translations/locales/be.json":return import("shared").then((function(e){return e.aF}));case"../shared/translations/locales/bg.json":return import("shared").then((function(e){return e.aG}));case"../shared/translations/locales/bn.json":return import("shared").then((function(e){return e.aH}));case"../shared/translations/locales/bs.json":return import("shared").then((function(e){return e.aI}));case"../shared/translations/locales/ca.json":return import("shared").then((function(e){return e.aJ}));case"../shared/translations/locales/cs.json":return import("shared").then((function(e){return e.aK}));case"../shared/translations/locales/cy.json":return import("shared").then((function(e){return e.aL}));case"../shared/translations/locales/da.json":return import("shared").then((function(e){return e.aM}));case"../shared/translations/locales/de-de.json":return import("shared").then((function(e){return e.aN}));case"../shared/translations/locales/de-x-informal.json":return import("shared").then((function(e){return e.aO}));case"../shared/translations/locales/de.json":return import("shared").then((function(e){return e.aP}));case"../shared/translations/locales/el.json":return import("shared").then((function(e){return e.aQ}));case"../shared/translations/locales/en-001.json":return import("shared").then((function(e){return e.aR}));case"../shared/translations/locales/en-150.json":return import("shared").then((function(e){return e.aS}));case"../shared/translations/locales/en-au.json":return import("shared").then((function(e){return e.aT}));case"../shared/translations/locales/en-ca.json":return import("shared").then((function(e){return e.aU}));case"../shared/translations/locales/en-gb.json":return import("shared").then((function(e){return e.aV}));case"../shared/translations/locales/en-my.json":return import("shared").then((function(e){return e.aW}));case"../shared/translations/locales/en-ph.json":return import("shared").then((function(e){return e.aX}));case"../shared/translations/locales/en-se.json":return import("shared").then((function(e){return e.aY}));case"../shared/translations/locales/en-us.json":return import("shared").then((function(e){return e.aZ}));case"../shared/translations/locales/en-x-dev.json":return import("shared").then((function(e){return e.a_}));case"../shared/translations/locales/en-x-keys.json":return import("shared").then((function(e){return e.a$}));case"../shared/translations/locales/en-x-obsolete.json":return import("shared").then((function(e){return e.b0}));case"../shared/translations/locales/en-x-pseudo.json":return import("shared").then((function(e){return e.b1}));case"../shared/translations/locales/en-x-test.json":return import("shared").then((function(e){return e.b2}));case"../shared/translations/locales/es-419.json":return import("shared").then((function(e){return e.b3}));case"../shared/translations/locales/es-ar.json":return import("shared").then((function(e){return e.b4}));case"../shared/translations/locales/es-cl.json":return import("shared").then((function(e){return e.b5}));case"../shared/translations/locales/es-es.json":return import("shared").then((function(e){return e.b6}));case"../shared/translations/locales/es-mx.json":return import("shared").then((function(e){return e.b7}));case"../shared/translations/locales/es-pe.json":return import("shared").then((function(e){return e.b8}));case"../shared/translations/locales/es.json":return import("shared").then((function(e){return e.b9}));case"../shared/translations/locales/et.json":return import("shared").then((function(e){return e.ba}));case"../shared/translations/locales/eu.json":return import("shared").then((function(e){return e.bb}));case"../shared/translations/locales/fa-af.json":return import("shared").then((function(e){return e.bc}));case"../shared/translations/locales/fa.json":return import("shared").then((function(e){return e.bd}));case"../shared/translations/locales/fi.json":return import("shared").then((function(e){return e.be}));case"../shared/translations/locales/fil.json":return import("shared").then((function(e){return e.bf}));case"../shared/translations/locales/fo.json":return import("shared").then((function(e){return e.bg}));case"../shared/translations/locales/fr-ca.json":return import("shared").then((function(e){return e.bh}));case"../shared/translations/locales/fr-dz.json":return import("shared").then((function(e){return e.bi}));case"../shared/translations/locales/fr-mu.json":return import("shared").then((function(e){return e.bj}));case"../shared/translations/locales/fr.json":return import("shared").then((function(e){return e.bk}));case"../shared/translations/locales/ga.json":return import("shared").then((function(e){return e.bl}));case"../shared/translations/locales/he.json":return import("shared").then((function(e){return e.bm}));case"../shared/translations/locales/hi.json":return import("shared").then((function(e){return e.bn}));case"../shared/translations/locales/hr.json":return import("shared").then((function(e){return e.bo}));case"../shared/translations/locales/hu.json":return import("shared").then((function(e){return e.bp}));case"../shared/translations/locales/hy.json":return import("shared").then((function(e){return e.bq}));case"../shared/translations/locales/id.json":return import("shared").then((function(e){return e.br}));case"../shared/translations/locales/is.json":return import("shared").then((function(e){return e.bs}));case"../shared/translations/locales/it-ch.json":return import("shared").then((function(e){return e.bt}));case"../shared/translations/locales/it.json":return import("shared").then((function(e){return e.bu}));case"../shared/translations/locales/ja.json":return import("shared").then((function(e){return e.bv}));case"../shared/translations/locales/ka.json":return import("shared").then((function(e){return e.bw}));case"../shared/translations/locales/kk.json":return import("shared").then((function(e){return e.bx}));case"../shared/translations/locales/kl-dk.json":return import("shared").then((function(e){return e.by}));case"../shared/translations/locales/km.json":return import("shared").then((function(e){return e.bz}));case"../shared/translations/locales/ko.json":return import("shared").then((function(e){return e.bA}));case"../shared/translations/locales/ku.json":return import("shared").then((function(e){return e.bB}));case"../shared/translations/locales/ky.json":return import("shared").then((function(e){return e.bC}));case"../shared/translations/locales/lt.json":return import("shared").then((function(e){return e.bD}));case"../shared/translations/locales/lv.json":return import("shared").then((function(e){return e.bE}));case"../shared/translations/locales/mk.json":return import("shared").then((function(e){return e.bF}));case"../shared/translations/locales/mn.json":return import("shared").then((function(e){return e.bG}));case"../shared/translations/locales/ms.json":return import("shared").then((function(e){return e.bH}));case"../shared/translations/locales/mt.json":return import("shared").then((function(e){return e.bI}));case"../shared/translations/locales/my.json":return import("shared").then((function(e){return e.bJ}));case"../shared/translations/locales/ne.json":return import("shared").then((function(e){return e.bK}));case"../shared/translations/locales/nl-be.json":return import("shared").then((function(e){return e.bL}));case"../shared/translations/locales/nl.json":return import("shared").then((function(e){return e.bM}));case"../shared/translations/locales/no.json":return import("shared").then((function(e){return e.bN}));case"../shared/translations/locales/pl.json":return import("shared").then((function(e){return e.bO}));case"../shared/translations/locales/pt-br.json":return import("shared").then((function(e){return e.bP}));case"../shared/translations/locales/pt.json":return import("shared").then((function(e){return e.bQ}));case"../shared/translations/locales/ro-md.json":return import("shared").then((function(e){return e.bR}));case"../shared/translations/locales/ro.json":return import("shared").then((function(e){return e.bS}));case"../shared/translations/locales/ru.json":return import("shared").then((function(e){return e.bT}));case"../shared/translations/locales/si.json":return import("shared").then((function(e){return e.bU}));case"../shared/translations/locales/sk.json":return import("shared").then((function(e){return e.bV}));case"../shared/translations/locales/sl.json":return import("shared").then((function(e){return e.bW}));case"../shared/translations/locales/sq.json":return import("shared").then((function(e){return e.bX}));case"../shared/translations/locales/sr-me.json":return import("shared").then((function(e){return e.bY}));case"../shared/translations/locales/sr.json":return import("shared").then((function(e){return e.bZ}));case"../shared/translations/locales/sv.json":return import("shared").then((function(e){return e.b_}));case"../shared/translations/locales/sw-ke.json":return import("shared").then((function(e){return e.b$}));case"../shared/translations/locales/ta.json":return import("shared").then((function(e){return e.c0}));case"../shared/translations/locales/th.json":return import("shared").then((function(e){return e.c1}));case"../shared/translations/locales/tr.json":return import("shared").then((function(e){return e.c2}));case"../shared/translations/locales/uk.json":return import("shared").then((function(e){return e.c3}));case"../shared/translations/locales/ur-pk.json":return import("shared").then((function(e){return e.c4}));case"../shared/translations/locales/ur.json":return import("shared").then((function(e){return e.c5}));case"../shared/translations/locales/uz.json":return import("shared").then((function(e){return e.c6}));case"../shared/translations/locales/vi.json":return import("shared").then((function(e){return e.c7}));case"../shared/translations/locales/zh-cn.json":return import("shared").then((function(e){return e.c8}));case"../shared/translations/locales/zh-tw.json":return import("shared").then((function(e){return e.c9}));default:return new Promise((function(n,s){("function"==typeof queueMicrotask?queueMicrotask:setTimeout)(s.bind(null,new Error("Unknown variable dynamic import: "+e)))}))}}(`../shared/translations/locales/${r}.json`)]),x.render(a.jsx(g,{theme:w(n),children:a.jsx(y,{helpCenterPath:t,children:a.jsx(ue,{...s,helpCenterPath:t})})}),e)}const de=n.div`
  border-top: ${({theme:e})=>`1px solid ${p({theme:e,hue:"grey",shade:300})}`};
  display: flex;
  flex-direction: column;
  padding-top: ${e=>4*e.theme.space.base}px; /* 16px */
`,pe=n(h)`
  margin-bottom: ${e=>e.theme.space.xxs}; /* 4px */
`,he=n(h)`
  color: ${({theme:e})=>p({theme:e,hue:"grey",shade:600})};
`;function je(e){switch(e){case J.APPROVED:return"Approved";case J.REJECTED:return"Rejected";default:return e}}var me=e.memo((function({decision:e,baseLocale:n}){const{t:s}=t();return a.jsxs(de,{children:[a.jsx(pe,{children:s("approval-requests.request.approval-request-details.previous-decision","Previous decision")}),a.jsxs(he,{children:[s(`approval-requests.request.approval-request-details.${e.status.toLowerCase()}`,je(e.status))," ",ne(e.decided_at??"",n)]}),e.decision_notes&&a.jsx(he,{children:`"${e.decision_notes}"`})]})}));const be=n(k)`
  padding: ${e=>6*e.theme.space.base}px; /* 24px */
  margin-left: 0;
  background: ${({theme:e})=>p({theme:e,variable:"background.default"})};
  border-radius: ${e=>e.theme.borderRadii.md}; /* 4px */
  max-width: 296px;

  @media (max-width: ${e=>e.theme.breakpoints.md}) {
    max-width: 100%;
  }
`,fe=n(h)`
  margin-bottom: ${e=>4*e.theme.space.base}px; /* 16px */
`,ve=n(h)`
  white-space: normal;
  overflow-wrap: break-word;
`,qe=n(h)`
  color: ${({theme:e})=>p({theme:e,hue:"grey",shade:600})};
`,xe=n(k.Row)`
  margin-bottom: ${e=>e.theme.space.sm}; /* 12px */

  &:last-child {
    margin-bottom: 0;
  }

  @media (max-width: ${e=>e.theme.breakpoints.sm}) {
    flex-direction: column; /* stack columns vertically */

    > div {
      width: 100% !important; /* full width for each Col */
      max-width: 100% !important;
      flex: none !important;
      margin-bottom: ${e=>e.theme.space.xxs}; /* 4px */
    }

    > div:last-child {
      margin-bottom: 0;
    }
  }
`;var ge=e.memo((function({approvalRequest:e,baseLocale:n}){const{t:s}=t(),r=e.status===J.WITHDRAWN?Boolean(e.withdrawn_reason):e.decisions.length>0,o=e.status===J.WITHDRAWN&&e.decisions.length>0;return a.jsxs(be,{children:[a.jsx(fe,{isBold:!0,children:s("approval-requests.request.approval-request-details.header","Approval request details")}),a.jsxs(xe,{children:[a.jsx(k.Col,{size:4,children:a.jsx(qe,{children:s("approval-requests.request.approval-request-details.sent-by","Sent by")})}),a.jsx(k.Col,{size:8,children:a.jsx(ve,{children:e.created_by_user.name})})]}),a.jsxs(xe,{children:[a.jsx(k.Col,{size:4,children:a.jsx(qe,{children:s("approval-requests.request.approval-request-details.sent-on","Sent on")})}),a.jsx(k.Col,{size:8,children:a.jsx(h,{children:ne(e.created_at,n)})})]}),a.jsxs(xe,{children:[a.jsx(k.Col,{size:4,children:a.jsx(qe,{children:s("approval-requests.request.approval-request-details.approver","Approver")})}),a.jsx(k.Col,{size:8,children:a.jsx(ve,{children:e.assignee_user.name})})]}),a.jsxs(xe,{children:[a.jsx(k.Col,{size:4,children:a.jsx(qe,{children:s("approval-requests.request.approval-request-details.status","Status")})}),a.jsx(k.Col,{size:8,children:a.jsx(h,{children:a.jsx(ee,{status:e.status})})})]}),r&&a.jsxs(xe,{children:[a.jsx(k.Col,{size:4,children:a.jsx(qe,{children:s("approval-requests.request.approval-request-details.comment_v2","Reason")})}),a.jsx(k.Col,{size:8,children:a.jsx(ve,{children:e.status===J.WITHDRAWN?e.withdrawn_reason:e.decisions[0]?.decision_notes??"-"})})]}),e.decided_at&&a.jsxs(xe,{children:[a.jsx(k.Col,{size:4,children:a.jsx(qe,{children:s(e.status===J.WITHDRAWN?"approval-requests.request.approval-request-details.withdrawn-on":"approval-requests.request.approval-request-details.decided",e.status===J.WITHDRAWN?"Withdrawn on":"Decided")})}),a.jsx(k.Col,{size:8,children:a.jsx(h,{children:ne(e.decided_at,n)})})]}),o&&e.decisions[0]&&a.jsx(me,{decision:e.decisions[0],baseLocale:n})]})}));const we=n(k)`
  padding: ${e=>e.theme.space.md}; /* 20px */
  border: ${e=>e.theme.borders.sm}
    ${({theme:e})=>p({theme:e,hue:"grey",shade:300})};
  border-radius: ${e=>e.theme.borderRadii.md}; /* 4px */
`,ye=n(h)`
  margin-bottom: ${e=>e.theme.space.md}; /* 20px */
`,ke=n(h)`
  color: ${({theme:e})=>p({theme:e,hue:"grey",shade:600})};
`,_e=n(c)`
  margin-inline-end: ${e=>e.theme.space.xxs}; /* 4px */
`,Ce=n.div`
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: ${e=>e.theme.space.md}; /* 20px */
  margin-top: ${e=>e.theme.space.md}; /* 20px */

  @media (max-width: ${e=>e.theme.breakpoints.md}) {
    grid-template-columns: repeat(2, 1fr);
  }
`,$e="-";function Ae({value:e}){const{t:n}=t();return Array.isArray(e)&&e.length>0?a.jsx(h,{children:e.map((e=>a.jsx(_e,{hue:"grey",children:e},e)))}):"boolean"==typeof e?a.jsx(h,{children:e?n("approval-requests.request.ticket-details.checkbox-value.yes","Yes"):n("approval-requests.request.ticket-details.checkbox-value.no","No")}):!e||Array.isArray(e)&&0===e.length?a.jsx(h,{children:$e}):a.jsx(h,{children:e})}const Re={Low:"approval-requests.request.ticket-details.priority_low",Normal:"approval-requests.request.ticket-details.priority_normal",High:"approval-requests.request.ticket-details.priority_high",Urgent:"approval-requests.request.ticket-details.priority_urgent"};var Se=e.memo((function({ticket:e}){const{t:n}=t(),s=Re[e.priority]?n(Re[e.priority],e.priority):e.priority;return a.jsxs(we,{children:[a.jsx(ye,{isBold:!0,children:n("approval-requests.request.ticket-details.header","Ticket details")}),a.jsxs(Ce,{children:[a.jsxs("div",{children:[a.jsx(ke,{children:n("approval-requests.request.ticket-details.requester","Requester")}),a.jsx(h,{children:e.requester.name})]}),a.jsxs("div",{children:[a.jsx(ke,{children:n("approval-requests.request.ticket-details.id","ID")}),a.jsx(h,{children:e.id})]}),a.jsxs("div",{children:[a.jsx(ke,{children:n("approval-requests.request.ticket-details.priority","Priority")}),a.jsx(h,{children:s})]}),e.custom_fields.map((e=>a.jsxs("div",{children:[a.jsx(ke,{children:e.title_in_portal}),a.jsx(Ae,{value:e.value})]},String(e.id))))]})]})}));const Ee="APPROVED",Ie="REJECTED",Te=n.div`
  display: flex;
  flex-direction: row;
  gap: ${e=>e.theme.space.md}; /* 20px */
  margin-inline-start: ${e=>e.hasAvatar?"55px":"0"}; // avatar width + margin + border

  @media (max-width: ${e=>e.theme.breakpoints.md}) {
    flex-direction: ${e=>e.isSubmitButton?"row-reverse":"column"};
    gap: ${e=>4*e.theme.space.base}px; /* 16px */
  }
`,De=n.div`
  display: flex;
  flex-direction: column;
  gap: ${e=>e.theme.space.lg}; /* 32px */

  @media (max-width: ${e=>e.theme.breakpoints.md}) {
    gap: ${e=>4*e.theme.space.base}px; /* 16px */
  }
`,ze=n.div`
  display: flex;
  gap: ${e=>4*e.theme.space.base}px; /* 16px */
  margin-top: ${e=>6*e.theme.space.base}px; /* 24px */
  align-items: flex-start;
`,Le=n.div`
  display: flex;
  flex-direction: column;
  flex: 1;
`;var Ue=e.memo((function({approvalRequestId:n,approvalWorkflowInstanceId:s,setApprovalRequest:r,assigneeUser:o}){const{t:l}=t(),[i,u]=e.useState(""),[c,d]=e.useState(null),[p,h]=e.useState(!1),[j,m]=e.useState(!1),b=c!==Ie||""!==i.trim(),f=j&&!b,v=e.useCallback((()=>{d(Ee),m(!1)}),[]),q=e.useCallback((()=>{d(Ie),m(!1)}),[]),x=e.useCallback((e=>{u(e.target.value)}),[]),g=e.useCallback((()=>{d(null),u(""),m(!1)}),[]),w=async()=>{if(m(!0),c&&b){h(!0);try{const e=c===Ee?J.APPROVED:J.REJECTED,t=await async function(e,n,s,t){try{const r=await fetch("/api/v2/users/me.json");if(!r.ok)throw new Error("Error fetching current user data");const a=await r.json();return await fetch(`/api/v2/approval_workflow_instances/${e}/approval_requests/${n}/decision`,{method:"PATCH",headers:{"Content-Type":"application/json","X-CSRF-Token":a.user.authenticity_token},body:JSON.stringify({status:s,notes:t})})}catch(e){throw console.error("Error submitting approval decision:",e),e}}(s,n,e,i);if(!t.ok)throw new Error(`Failed to submit ${e} decision`);{const n=await t.json();r(n.approval_request);const s=e===J.APPROVED?l("approval-requests.request.notification.approval-submitted","Approval submitted"):l("approval-requests.request.notification.denial-submitted","Denial submitted");R({type:"success",title:s,message:""})}}catch(e){R({type:"error",title:"Error submitting decision",message:"Please try again later"})}finally{h(!1)}}};if(c){const e=c===Ee?l("approval-requests.request.approver-actions.additional-note-label","Additional note"):l("approval-requests.request.approver-actions.denial-reason-label","Reason for denial* (Required)"),n=Boolean(o?.photo?.content_url);return a.jsxs(De,{children:[a.jsxs(_,{children:[a.jsx(_.Label,{children:e}),a.jsxs(ze,{children:[n&&a.jsx(C,{children:a.jsx("img",{alt:"Assignee avatar",src:o.photo.content_url??void 0})}),a.jsxs(Le,{children:[a.jsx($,{minRows:5,value:i,onChange:x,disabled:p,validation:f?"error":void 0}),f&&a.jsx(_.Message,{validation:"error",children:l("approval-requests.request.approver-actions.denial-reason-validation","Enter a reason for denial")})]})]})]}),a.jsxs(Te,{hasAvatar:n,isSubmitButton:!0,children:[a.jsx(A,{isPrimary:!0,onClick:w,disabled:p,children:c===Ee?l("approval-requests.request.approver-actions.submit-approval","Submit approval"):l("approval-requests.request.approver-actions.submit-denial","Submit denial")}),a.jsx(A,{onClick:g,disabled:p,children:l("approval-requests.request.approver-actions.cancel","Cancel")})]})]})}return a.jsxs(Te,{children:[a.jsx(A,{isPrimary:!0,onClick:v,children:l("approval-requests.request.approver-actions.approve-request","Approve request")}),a.jsx(A,{onClick:q,children:l("approval-requests.request.approver-actions.deny-request","Deny request")})]})}));const Pe=n(S)`
  margin-top: ${e=>e.theme.space.lg}; /* 32px */
`,Ve=n(j)`
  &:visited {
    color: ${({theme:e})=>p({theme:e,hue:"blue",shade:600})};
  }
`;var Be=e.memo((function({organizations:e,helpCenterPath:n}){const{t:s}=t(),r=e.length>0?e[0]?.name:null;return r?a.jsxs(Pe,{children:[a.jsx(Ve,{href:n,children:r}),a.jsx(Ve,{href:`${n}/approval_requests`,children:s("approval-requests.list.header","Approval requests")})]}):a.jsx(Pe,{children:a.jsx(Ve,{href:`${n}/approval_requests`,children:s("approval-requests.list.header","Approval requests")})})}));const Fe=()=>{const{t:e}=t();return{title:e("txt.approval_requests.clarification.title","Comments"),description:e("txt.approval_requests.clarification.description","Add notes or ask for additional information about this request"),comment_form_aria_label:e("txt.approval_requests.clarification.comment_form_aria_label","Enter a comment to ask for additional information about this approval request"),submit_button:e("txt.approval_requests.clarification.submit_button","Send"),cancel_button:e("txt.approval_requests.clarification.cancel_button","Cancel"),validation_empty_input:e("txt.approval_requests.clarification.validation_empty_comment_error","Enter a comment")}},Ne=40,We=500,He="https://secure.gravatar.com/avatar/6d713fed56e4dd3e48f6b824b8789d7f?default=https%3A%2F%2Fassets.zendesk.com%2Fhc%2Fassets%2Fdefault_avatar.png&r=g",Ke=({onSubmit:n,baseLocale:s,markAllCommentsAsRead:r})=>{const a=e.useRef(null),o=e.useRef(null),[l,i]=e.useState(""),[u,c]=e.useState(),[d,p]=e.useState(!1),[h,j]=e.useState(""),{t:m}=t(),b=()=>{i(""),c(void 0),j(""),p(!1),a.current?.blur()},f=e.useCallback((async()=>{if(!(l.trim().length>0))return c("error"),a.current?.focus(),!1;try{return await n(l),r(),b(),!0}catch(e){return console.error(e),!1}}),[l,r,n]),v=e.useCallback((async e=>{const n=(e.ctrlKey||e.metaKey)&&"c"===e.key.toLowerCase(),s=(e.ctrlKey||e.metaKey)&&"a"===e.key.toLowerCase(),t=(e.ctrlKey||e.metaKey)&&"x"===e.key.toLowerCase(),r=(e.ctrlKey||e.metaKey)&&"z"===e.key.toLowerCase();!(l.length>=We)||["Backspace","Delete","ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Tab","Enter","Escape","Home","End"].includes(e.key)||n||s||t||r?"Enter"===e.key&&!1===e.shiftKey?(e.preventDefault(),await f()):"Escape"===e.key&&(e.preventDefault(),b()):e.preventDefault()}),[l.length,f]),q=e.useCallback((e=>{let n=e.target.value;n.length>We&&(n=n.substring(0,We)),i(n),p(!0);const t=We-n.length;if(t>=0&&t<=10){const e=new Intl.PluralRules(s).select(t);c("warning"),j(m(`txt.approval_requests.validation.characters_remaining.${e}`,{numCharacters:t,defaultValue:`${t} character${"one"===e?"":"s"} remaining`}))}else"warning"===u&&(c(void 0),j(""));"error"===u&&n.trim().length>0&&c(void 0)}),[s,u,m]);return{textareaRef:a,buttonsContainerRef:o,charLimitMessage:h,comment:l,commentValidation:u,isInputFocused:d,setComment:i,handleBlur:e=>{const n=e?.relatedTarget;n&&o.current?.contains(n)||p(!1)},handleCancel:b,handleChange:q,handleFocus:()=>{p(!0)},handleKeyDown:v,handleSubmit:f}},Me=()=>{const[n,s]=e.useState(!1);return{handleSubmitComment:async e=>{s(!0);try{return console.log("Submitting comment:",e),await new Promise((e=>setTimeout(e,500))),{success:!0,message:"Comment logged successfully"}}finally{s(!1)}},isLoading:n}},Oe=n(k)`
  margin-top: ${({theme:e})=>e.space.xs};
  padding-top: ${({theme:e})=>e.space.md};
`,Je=n(E)`
  max-width: 55px;
`,Ye=n(I)`
  margin-top: 10px;
  margin-left: 55px;
`,Ge=n(A)`
  margin: 10px;
`;function Xe({baseLocale:e,currentUserAvatarUrl:n,currentUserName:s,markAllCommentsAsRead:t}){const{comment_form_aria_label:r,submit_button:o,cancel_button:l,validation_empty_input:i}=Fe(),{handleSubmitComment:u,isLoading:c=!1}=Me(),{buttonsContainerRef:d,comment:p,commentValidation:h,charLimitMessage:j,handleBlur:m,handleCancel:b,handleFocus:f,handleKeyDown:v,handleSubmit:q,handleChange:x,isInputFocused:g,textareaRef:w}=Ke({onSubmit:u,baseLocale:e,markAllCommentsAsRead:t});return a.jsxs(Oe,{gutters:!1,children:[a.jsxs(I,{children:[a.jsx(Je,{children:a.jsx(C,{size:"small",children:a.jsx("img",{alt:s,src:n||He})})}),a.jsx(E,{children:a.jsxs(_,{children:[a.jsx(T,{hidden:!0,children:r}),a.jsx($,{ref:w,validation:h,minRows:g||p.trim().length>0?4:1,maxRows:4,value:p,onChange:x,onKeyDown:v,onBlur:m,onFocus:f}),a.jsx(D,{validation:h,children:"error"===h?i:"warning"===h?j:null})]})})]}),(g||p.trim().length>0)&&a.jsx(Ye,{ref:d,children:a.jsxs(E,{textAlign:"start",children:[a.jsx(A,{disabled:c,onClick:q,children:o}),a.jsx(Ge,{disabled:c,onClick:b,isBasic:!0,children:l})]})})]})}const Ze=(e,n)=>`zenGuide:approvalRequest:${e}:comment:${n.id}`;const Qe=n.div`
  align-items: center;
  color: ${({theme:e})=>p({theme:e,hue:"red",shade:600})};
  display: flex;
  font-size: ${({theme:e})=>e.fontSizes.md};
  text-align: center;
  padding-top: ${({theme:e})=>e.space.sm};
  padding-bottom: ${({theme:e})=>e.space.xxs};

  &:before,
  &:after {
    content: "";
    flex: 1;
    border-bottom: 1px solid
      ${e=>p({theme:e.theme,hue:"red",shade:600})};
  }

  &:before {
    margin-right: 16px;
  }

  &:after {
    margin-left: 16px;
  }
`;function en({unreadCount:e}){const{t:n}=t();return a.jsx(Qe,{children:1===e?n("txt.approval_requests.clarification.new_comment_indicator","New comment"):n("txt.approval_requests.clarification.new_comments_indicator","New comments")})}const nn=new Map;let sn=null;const tn=(n,s)=>{const t=e.useCallback((()=>{const e=n.current;if(!e)return;const t=sn||(sn=new IntersectionObserver((e=>{e.forEach((e=>{if(e.isIntersecting){const n=nn.get(e.target);n&&(n(),sn?.unobserve(e.target),nn.delete(e.target))}}))}),{threshold:1}),sn);nn.set(e,s),t.observe(e)}),[n,s]),r=e.useCallback((()=>{const e=n.current;e&&sn&&(sn.unobserve(e),nn.delete(e))}),[n]);e.useEffect((()=>(t(),()=>r())),[t,r])},rn=n(z)`
  color: ${({theme:e})=>p({theme:e,hue:"grey",shade:600})};
  align-self: center;
  justify-content: center;
  padding-top: 1px;
`;const an=({eventTime:n,locale:s})=>{const{t:r}=t(),o=e.useMemo((()=>function(e){return new Intl.DateTimeFormat(e,{hour:"numeric"}).resolvedOptions().hour12??!0}(s)),[s]),l=new Date,i=new Date(n);if(isNaN(i.getTime()))return null;const u=L(l,i),c=U(l,i);if(u<0||u<60)return a.jsx(rn,{children:(r("approval_request.clarification.timestamp_lessThanAMinuteAgo"),"< 1 minute ago")});if(c<60){const e=new Intl.PluralRules(s).select(c);return a.jsx(rn,{children:(r("approval_request.clarification.timestamp_minutesAgo",{count:c,plural:e}),`${c} minute${"one"===e?"":"s"} ago`)})}const d=((e,n,s)=>e.toLocaleTimeString(n,{hour:"numeric",minute:"2-digit",hour12:s}))(i,s,o);if(V(i,l))return a.jsx(rn,{children:(r("approval_request.clarification.timestamp_todayAt",{time:d}),`Today at ${d}`)});if(((e,n)=>{const s=B(n,1);return V(e,s)})(i,l))return a.jsx(rn,{children:(r("approval_request.clarification.timestamp_yesterdayAt",{time:d}),`Yesterday at ${d}`)});if(P(i,l)){const e=((e,n)=>e.toLocaleDateString(n,{month:"short",day:"2-digit"}))(i,s);return a.jsx(rn,{children:(r("approval_request.clarification.timestamp_dateAt",{date:e,time:d}),`${e} at ${d}`)})}const p=((e,n)=>e.toLocaleDateString(n,{month:"short",day:"2-digit",year:"numeric"}))(i,s);return a.jsx(rn,{children:(r("approval_request.clarification.timestamp_dateAt",{date:p,time:d}),`${p} at ${d}`)})},on=n.div`
  position: relative;
  display: inline-block;
`,ln=n.div`
  position: absolute;
  bottom: -3px;
  right: -3px;
  border-radius: 50%;
  width: 13px;
  height: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: ${({theme:e})=>p({theme:e,hue:"grey",shade:100})};
  border: ${({theme:e})=>e.borders.sm};
`,un=n(F)`
  width: 9px;
  height: 9px;
  color: ${({theme:e})=>p({theme:e,hue:"grey",shade:900})};
`,cn=({name:e,photoUrl:n,size:s})=>a.jsxs(on,{children:[a.jsx(C,{size:s,children:a.jsx("img",{alt:e,src:n||He})}),a.jsx(ln,{children:a.jsx(un,{})})]}),dn=n.div`
  margin-top: ${({theme:e})=>e.space.sm};
`,pn=n.div`
  margin-top: ${({theme:e})=>e.space.xs};
`,hn=n(E)`
  max-width: 55px;
`,jn=n.span`
  padding: 0px 6px;
`,mn=n(E)`
  display: flex;
  flex-direction: row;
  align-items: start;
`,bn=n(N)`
  width: ${({theme:e})=>e.space.xs};
  height: ${({theme:e})=>e.space.xs};
  color: ${({theme:e})=>p({theme:e,hue:"grey",shade:600})};
`;const fn=e.memo((function({baseLocale:n,children:s,comment:t,commentKey:r,createdByUserId:o,markCommentAsVisible:l}){const i=e.useRef(null),{author:u,created_at:c}=t,{avatar:d,name:p,id:j}=u;tn(i,(()=>l(r)));const m=o===j;return a.jsx(dn,{ref:i,children:a.jsx(k,{gutters:!1,children:a.jsxs(I,{children:[a.jsx(hn,{children:m?a.jsx(cn,{photoUrl:d,size:"small",name:p}):a.jsx(C,{size:"small",children:a.jsx("img",{alt:p,src:d||He})})}),a.jsxs(E,{children:[a.jsx(I,{alignItems:"start",justifyContent:"start",children:a.jsxs(mn,{children:[a.jsx(h,{isBold:!0,children:p}),a.jsx(jn,{children:a.jsx(bn,{})}),c&&a.jsx(an,{eventTime:c,locale:n})]})}),a.jsx(pn,{children:s})]})]})})})})),vn=n(W)`
  margin-top: ${({theme:e})=>e.space.md};
  padding: ${({theme:e})=>e.space.md} ${({theme:e})=>e.space.xl};
`,qn=({approvalRequestId:n,commentCount:s,currentUserId:r,isTerminalStatus:o})=>{const{t:l}=t(),i=`nearLimitAlertDismissed_${r}_${n}`,[u,c]=e.useState((()=>"true"!==localStorage.getItem(i))),d=s>=Ne,p=s>=Ne-5&&s<Ne&&u,h=Ne-s,j=e.useCallback((()=>{localStorage.setItem(i,"true"),c(!1)}),[i]);if(!o){if(d)return a.jsxs(vn,{type:"info",children:[a.jsx(H,{children:l("txt.approval_requests.clarification.max_comment_alert_title","Comment limit reached")}),l("txt.approval_requests.clarification.max_comment_alert_message","You can't add more comments, approvers can still approve or deny.")]});if(p)return a.jsxs(vn,{type:"info",children:[a.jsx(H,{children:l("txt.approval_requests.clarification.near_comment_limit_alert_title","Comment limit nearly reached")}),(l("txt.approval_requests.panel.single_approval_request.clarification.near_comment_limit_alert_message",{current_count:s,remaining_count:h}),`This request has ${s} of 40 comments available. You have ${h} remaining.`),a.jsx(K,{onClick:j,"aria-label":l("txt.approval_requests.panel.single_approval_request.clarification.close_alert_button_aria_label","Close alert")})]})}return null},xn=n.div`
  display: flex;
  flex-direction: column;
  border-top: ${({showCommentHeader:e,theme:n})=>e?`1px solid ${p({theme:n,hue:"grey",shade:200})}`:"none"};
  padding-top: 16px;
`,gn=n.div`
  flex: 1 1 auto;
`,wn=n(h)`
  padding: ${({theme:e})=>e.space.xxs} 0;
  overflow-wrap: break-word;
  white-space: normal;
`,yn=n.div`
  padding-bottom: 16px;
`,kn=n(h)`
  padding-top: ${({theme:e})=>e.space.xxs};
  color: ${e=>M("grey",600,e.theme)};
`;function _n({approvalRequestId:n,baseLocale:s,clarificationFlowMessages:t,createdByUserId:r,currentUserAvatarUrl:o,currentUserId:l,currentUserName:i,hasUserViewedBefore:u,status:c}){const d=Fe(),p=t&&t.length>0,j=!!c&&("withdrawn"===c||"approved"===c||"rejected"===c),m=!j&&t.length<Ne,b=!j||p,{unreadComments:f,firstUnreadCommentKey:v,markCommentAsVisible:q,markAllCommentsAsRead:x}=function({comments:n,currentUserId:s,approvalRequestId:t}){const r=window.localStorage,a=`readComments:${s}:${t}`,o=e.useCallback((()=>{try{const e=r.getItem(a);return e?JSON.parse(e):{}}catch{return{}}}),[a,r]),l=e.useCallback((e=>{try{r.setItem(a,JSON.stringify(e))}catch{}}),[a,r]),[i,u]=e.useState((()=>o()));e.useEffect((()=>{u(o())}),[t,o]);const c=e.useCallback((()=>{u((e=>{const n={...e};return Object.keys(n).forEach((e=>{n[e]?.visible&&(n[e]={...n[e],read:!0})})),l(n),n}))}),[l]),{unreadComments:d,firstUnreadCommentKey:p}=e.useMemo((()=>{const e=n.filter((e=>String(e.author.id)!==String(s))).filter((e=>{const n=Ze(t,e),s=i[n];return!s?.read}));return{unreadComments:e,firstUnreadCommentKey:e[0]?Ze(t,e[0]):null}}),[n,i,s,t]);return{firstUnreadCommentKey:p,markCommentAsVisible:e=>{const n={...i};n[e]?.visible||(n[e]={...n[e],visible:!0,read:n[e]?.read??!1},l(n),u(n))},markAllCommentsAsRead:c,unreadComments:d}}({comments:t,currentUserId:l,approvalRequestId:n});return e.useEffect((()=>{const e=()=>{x()};return window.addEventListener("beforeunload",e),()=>{window.removeEventListener("beforeunload",e)}}),[x]),a.jsxs(xn,{showCommentHeader:b,children:[b&&a.jsxs(yn,{children:[a.jsx(h,{isBold:!0,children:d.title}),m&&a.jsx(kn,{children:d.description})]}),a.jsx(gn,{"data-testid":"comment-list-area",children:p&&t.map((e=>{const t=Ze(n,e),o=t===v,l=f.length;return a.jsxs(O.Fragment,{children:[!j&&l>0&&o&&u&&a.jsx(en,{unreadCount:l}),a.jsx(wn,{children:a.jsx(fn,{baseLocale:s,comment:e,commentKey:t,createdByUserId:r,markCommentAsVisible:q,children:e.message})},e.id)]},`${e.id}`)}))}),a.jsx(qn,{approvalRequestId:n,commentCount:t.length,currentUserId:l,isTerminalStatus:j}),m&&a.jsx(Xe,{baseLocale:s,currentUserAvatarUrl:o,currentUserName:i,markAllCommentsAsRead:x})]})}const Cn=n.div`
  display: grid;
  grid-template-columns: 2fr 1fr;
  grid-template-areas:
    "left right"
    "approverActions right"
    "clarification right";

  grid-gap: ${e=>e.theme.space.lg};
  margin-top: ${e=>e.theme.space.xl}; /* 40px */
  margin-bottom: ${e=>e.theme.space.lg}; /* 32px */

  @media (max-width: ${e=>e.theme.breakpoints.md}) {
    grid-template-columns: 1fr;
    grid-template-areas:
      "left"
      "right"
      "approverActions"
      "clarification";
    margin-bottom: ${e=>e.theme.space.xl};
  }
`,$n=n.div`
  display: flex;
  justify-content: center;
  align-items: center;
`,An=n.div`
  grid-area: left;

  & > *:first-child {
    margin-bottom: ${e=>4*e.theme.space.base}px; /* 16px */
  }

  & > *:not(:first-child) {
    margin-bottom: ${e=>e.theme.space.lg}; /* 32px */
  }

  & > *:last-child {
    margin-bottom: 0;
  }
`,Rn=n.div`
  grid-area: right;
`,Sn=n.div`
  grid-area: clarification;
`,En=n.div`
  grid-area: approverActions;
  margin-top: ${e=>e.theme.space.lg};
`;var In=e.memo((function({approvalWorkflowInstanceId:n,approvalRequestId:s,baseLocale:t,helpCenterPath:r,organizations:o,userId:l,userAvatarUrl:i,userName:u}){const{approvalRequest:c,setApprovalRequest:d,errorFetchingApprovalRequest:p,isLoading:j}=function(n,s){const[t,r]=e.useState(),[a,o]=e.useState(null),[l,i]=e.useState(!1);return e.useEffect((()=>{(async()=>{i(!0);try{const e=await fetch(`/api/v2/approval_workflow_instances/${n}/approval_requests/${s}`);if(!e.ok)throw new Error("Error fetching approval request");{const n=await e.json();r(n.approval_request)}}catch(e){o(e)}finally{i(!1)}})()}),[s,n]),{approvalRequest:t,errorFetchingApprovalRequest:a,isLoading:l,setApprovalRequest:r}}(n,s),{hasUserViewedBefore:m,markUserViewed:v}=function({approvalRequestId:n,currentUserId:s}){const t=void 0!==n,r=window.localStorage,a=`userViewedApproval:${s}:${n}`,o=e.useCallback((()=>{if(!t)return!1;try{return"true"===r.getItem(a)}catch{return!1}}),[t,r,a]),[l,i]=e.useState((()=>o())),u=e.useCallback((()=>{if(t)try{r.setItem(a,"true"),i(!0)}catch{}}),[t,r,a]);return e.useEffect((()=>{t&&i(o())}),[n,s,o,t]),{hasUserViewedBefore:l,markUserViewed:u}}({approvalRequestId:c?.id,currentUserId:l});if(e.useEffect((()=>{const e=()=>{v()};return window.addEventListener("beforeunload",e),()=>{window.removeEventListener("beforeunload",e)}}),[v]),p)throw p;if(j||!c)return a.jsx($n,{children:a.jsx(b,{size:"64"})});const q=l===c.assignee_user.id&&"active"===c.status,x=void 0!==c?.clarification_flow_messages;return a.jsxs(a.Fragment,{children:[a.jsx(Be,{helpCenterPath:r,organizations:o}),a.jsxs(Cn,{children:[a.jsxs(An,{children:[a.jsx(f,{isBold:!0,children:c.subject}),a.jsx(h,{children:c.message}),c.ticket_details&&a.jsx(Se,{ticket:c.ticket_details})]}),a.jsx(Rn,{children:c&&a.jsx(ge,{approvalRequest:c,baseLocale:t})}),q&&a.jsx(En,{children:a.jsx(Ue,{approvalWorkflowInstanceId:n,approvalRequestId:s,setApprovalRequest:d,assigneeUser:c.assignee_user})}),x&&a.jsx(Sn,{children:a.jsx(_n,{approvalRequestId:c.id,baseLocale:t,clarificationFlowMessages:c.clarification_flow_messages,createdByUserId:c.created_by_user.id,currentUserAvatarUrl:i,currentUserId:l,currentUserName:u,hasUserViewedBefore:m,status:c.status})})]})]})}));async function Tn(e,n,s,t){const{baseLocale:r}=s;v(r),await q(r,[()=>function(e){switch(e){case"./translations/locales/af.json":return import("approval-requests-translations").then((function(e){return e.a}));case"./translations/locales/ar-x-pseudo.json":return import("approval-requests-translations").then((function(e){return e.b}));case"./translations/locales/ar.json":return import("approval-requests-translations").then((function(e){return e.c}));case"./translations/locales/az.json":return import("approval-requests-translations").then((function(e){return e.d}));case"./translations/locales/be.json":return import("approval-requests-translations").then((function(e){return e.e}));case"./translations/locales/bg.json":return import("approval-requests-translations").then((function(e){return e.f}));case"./translations/locales/bn.json":return import("approval-requests-translations").then((function(e){return e.g}));case"./translations/locales/bs.json":return import("approval-requests-translations").then((function(e){return e.h}));case"./translations/locales/ca.json":return import("approval-requests-translations").then((function(e){return e.i}));case"./translations/locales/cs.json":return import("approval-requests-translations").then((function(e){return e.j}));case"./translations/locales/cy.json":return import("approval-requests-translations").then((function(e){return e.k}));case"./translations/locales/da.json":return import("approval-requests-translations").then((function(e){return e.l}));case"./translations/locales/de-de.json":return import("approval-requests-translations").then((function(e){return e.m}));case"./translations/locales/de-x-informal.json":return import("approval-requests-translations").then((function(e){return e.n}));case"./translations/locales/de.json":return import("approval-requests-translations").then((function(e){return e.o}));case"./translations/locales/el.json":return import("approval-requests-translations").then((function(e){return e.p}));case"./translations/locales/en-001.json":return import("approval-requests-translations").then((function(e){return e.q}));case"./translations/locales/en-150.json":return import("approval-requests-translations").then((function(e){return e.r}));case"./translations/locales/en-au.json":return import("approval-requests-translations").then((function(e){return e.s}));case"./translations/locales/en-ca.json":return import("approval-requests-translations").then((function(e){return e.t}));case"./translations/locales/en-gb.json":return import("approval-requests-translations").then((function(e){return e.u}));case"./translations/locales/en-my.json":return import("approval-requests-translations").then((function(e){return e.v}));case"./translations/locales/en-ph.json":return import("approval-requests-translations").then((function(e){return e.w}));case"./translations/locales/en-se.json":return import("approval-requests-translations").then((function(e){return e.x}));case"./translations/locales/en-us.json":return import("approval-requests-translations").then((function(e){return e.y}));case"./translations/locales/en-x-dev.json":return import("approval-requests-translations").then((function(e){return e.z}));case"./translations/locales/en-x-keys.json":return import("approval-requests-translations").then((function(e){return e.A}));case"./translations/locales/en-x-obsolete.json":return import("approval-requests-translations").then((function(e){return e.B}));case"./translations/locales/en-x-pseudo.json":return import("approval-requests-translations").then((function(e){return e.C}));case"./translations/locales/en-x-test.json":return import("approval-requests-translations").then((function(e){return e.D}));case"./translations/locales/es-419.json":return import("approval-requests-translations").then((function(e){return e.E}));case"./translations/locales/es-ar.json":return import("approval-requests-translations").then((function(e){return e.F}));case"./translations/locales/es-cl.json":return import("approval-requests-translations").then((function(e){return e.G}));case"./translations/locales/es-es.json":return import("approval-requests-translations").then((function(e){return e.H}));case"./translations/locales/es-mx.json":return import("approval-requests-translations").then((function(e){return e.I}));case"./translations/locales/es-pe.json":return import("approval-requests-translations").then((function(e){return e.J}));case"./translations/locales/es.json":return import("approval-requests-translations").then((function(e){return e.K}));case"./translations/locales/et.json":return import("approval-requests-translations").then((function(e){return e.L}));case"./translations/locales/eu.json":return import("approval-requests-translations").then((function(e){return e.M}));case"./translations/locales/fa-af.json":return import("approval-requests-translations").then((function(e){return e.N}));case"./translations/locales/fa.json":return import("approval-requests-translations").then((function(e){return e.O}));case"./translations/locales/fi.json":return import("approval-requests-translations").then((function(e){return e.P}));case"./translations/locales/fil.json":return import("approval-requests-translations").then((function(e){return e.Q}));case"./translations/locales/fo.json":return import("approval-requests-translations").then((function(e){return e.R}));case"./translations/locales/fr-ca.json":return import("approval-requests-translations").then((function(e){return e.S}));case"./translations/locales/fr-dz.json":return import("approval-requests-translations").then((function(e){return e.T}));case"./translations/locales/fr-mu.json":return import("approval-requests-translations").then((function(e){return e.U}));case"./translations/locales/fr.json":return import("approval-requests-translations").then((function(e){return e.V}));case"./translations/locales/ga.json":return import("approval-requests-translations").then((function(e){return e.W}));case"./translations/locales/he.json":return import("approval-requests-translations").then((function(e){return e.X}));case"./translations/locales/hi.json":return import("approval-requests-translations").then((function(e){return e.Y}));case"./translations/locales/hr.json":return import("approval-requests-translations").then((function(e){return e.Z}));case"./translations/locales/hu.json":return import("approval-requests-translations").then((function(e){return e._}));case"./translations/locales/hy.json":return import("approval-requests-translations").then((function(e){return e.$}));case"./translations/locales/id.json":return import("approval-requests-translations").then((function(e){return e.a0}));case"./translations/locales/is.json":return import("approval-requests-translations").then((function(e){return e.a1}));case"./translations/locales/it-ch.json":return import("approval-requests-translations").then((function(e){return e.a2}));case"./translations/locales/it.json":return import("approval-requests-translations").then((function(e){return e.a3}));case"./translations/locales/ja.json":return import("approval-requests-translations").then((function(e){return e.a4}));case"./translations/locales/ka.json":return import("approval-requests-translations").then((function(e){return e.a5}));case"./translations/locales/kk.json":return import("approval-requests-translations").then((function(e){return e.a6}));case"./translations/locales/kl-dk.json":return import("approval-requests-translations").then((function(e){return e.a7}));case"./translations/locales/km.json":return import("approval-requests-translations").then((function(e){return e.a8}));case"./translations/locales/ko.json":return import("approval-requests-translations").then((function(e){return e.a9}));case"./translations/locales/ku.json":return import("approval-requests-translations").then((function(e){return e.aa}));case"./translations/locales/ky.json":return import("approval-requests-translations").then((function(e){return e.ab}));case"./translations/locales/lt.json":return import("approval-requests-translations").then((function(e){return e.ac}));case"./translations/locales/lv.json":return import("approval-requests-translations").then((function(e){return e.ad}));case"./translations/locales/mk.json":return import("approval-requests-translations").then((function(e){return e.ae}));case"./translations/locales/mn.json":return import("approval-requests-translations").then((function(e){return e.af}));case"./translations/locales/ms.json":return import("approval-requests-translations").then((function(e){return e.ag}));case"./translations/locales/mt.json":return import("approval-requests-translations").then((function(e){return e.ah}));case"./translations/locales/my.json":return import("approval-requests-translations").then((function(e){return e.ai}));case"./translations/locales/ne.json":return import("approval-requests-translations").then((function(e){return e.aj}));case"./translations/locales/nl-be.json":return import("approval-requests-translations").then((function(e){return e.ak}));case"./translations/locales/nl.json":return import("approval-requests-translations").then((function(e){return e.al}));case"./translations/locales/no.json":return import("approval-requests-translations").then((function(e){return e.am}));case"./translations/locales/pl.json":return import("approval-requests-translations").then((function(e){return e.an}));case"./translations/locales/pt-br.json":return import("approval-requests-translations").then((function(e){return e.ao}));case"./translations/locales/pt.json":return import("approval-requests-translations").then((function(e){return e.ap}));case"./translations/locales/ro-md.json":return import("approval-requests-translations").then((function(e){return e.aq}));case"./translations/locales/ro.json":return import("approval-requests-translations").then((function(e){return e.ar}));case"./translations/locales/ru.json":return import("approval-requests-translations").then((function(e){return e.as}));case"./translations/locales/si.json":return import("approval-requests-translations").then((function(e){return e.at}));case"./translations/locales/sk.json":return import("approval-requests-translations").then((function(e){return e.au}));case"./translations/locales/sl.json":return import("approval-requests-translations").then((function(e){return e.av}));case"./translations/locales/sq.json":return import("approval-requests-translations").then((function(e){return e.aw}));case"./translations/locales/sr-me.json":return import("approval-requests-translations").then((function(e){return e.ax}));case"./translations/locales/sr.json":return import("approval-requests-translations").then((function(e){return e.ay}));case"./translations/locales/sv.json":return import("approval-requests-translations").then((function(e){return e.az}));case"./translations/locales/sw-ke.json":return import("approval-requests-translations").then((function(e){return e.aA}));case"./translations/locales/ta.json":return import("approval-requests-translations").then((function(e){return e.aB}));case"./translations/locales/th.json":return import("approval-requests-translations").then((function(e){return e.aC}));case"./translations/locales/tr.json":return import("approval-requests-translations").then((function(e){return e.aD}));case"./translations/locales/uk.json":return import("approval-requests-translations").then((function(e){return e.aE}));case"./translations/locales/ur-pk.json":return import("approval-requests-translations").then((function(e){return e.aF}));case"./translations/locales/ur.json":return import("approval-requests-translations").then((function(e){return e.aG}));case"./translations/locales/uz.json":return import("approval-requests-translations").then((function(e){return e.aH}));case"./translations/locales/vi.json":return import("approval-requests-translations").then((function(e){return e.aI}));case"./translations/locales/zh-cn.json":return import("approval-requests-translations").then((function(e){return e.aJ}));case"./translations/locales/zh-tw.json":return import("approval-requests-translations").then((function(e){return e.aK}));default:return new Promise((function(n,s){("function"==typeof queueMicrotask?queueMicrotask:setTimeout)(s.bind(null,new Error("Unknown variable dynamic import: "+e)))}))}}(`./translations/locales/${r}.json`),()=>function(e){switch(e){case"../shared/translations/locales/af.json":return import("shared").then((function(e){return e.aB}));case"../shared/translations/locales/ar-x-pseudo.json":return import("shared").then((function(e){return e.aC}));case"../shared/translations/locales/ar.json":return import("shared").then((function(e){return e.aD}));case"../shared/translations/locales/az.json":return import("shared").then((function(e){return e.aE}));case"../shared/translations/locales/be.json":return import("shared").then((function(e){return e.aF}));case"../shared/translations/locales/bg.json":return import("shared").then((function(e){return e.aG}));case"../shared/translations/locales/bn.json":return import("shared").then((function(e){return e.aH}));case"../shared/translations/locales/bs.json":return import("shared").then((function(e){return e.aI}));case"../shared/translations/locales/ca.json":return import("shared").then((function(e){return e.aJ}));case"../shared/translations/locales/cs.json":return import("shared").then((function(e){return e.aK}));case"../shared/translations/locales/cy.json":return import("shared").then((function(e){return e.aL}));case"../shared/translations/locales/da.json":return import("shared").then((function(e){return e.aM}));case"../shared/translations/locales/de-de.json":return import("shared").then((function(e){return e.aN}));case"../shared/translations/locales/de-x-informal.json":return import("shared").then((function(e){return e.aO}));case"../shared/translations/locales/de.json":return import("shared").then((function(e){return e.aP}));case"../shared/translations/locales/el.json":return import("shared").then((function(e){return e.aQ}));case"../shared/translations/locales/en-001.json":return import("shared").then((function(e){return e.aR}));case"../shared/translations/locales/en-150.json":return import("shared").then((function(e){return e.aS}));case"../shared/translations/locales/en-au.json":return import("shared").then((function(e){return e.aT}));case"../shared/translations/locales/en-ca.json":return import("shared").then((function(e){return e.aU}));case"../shared/translations/locales/en-gb.json":return import("shared").then((function(e){return e.aV}));case"../shared/translations/locales/en-my.json":return import("shared").then((function(e){return e.aW}));case"../shared/translations/locales/en-ph.json":return import("shared").then((function(e){return e.aX}));case"../shared/translations/locales/en-se.json":return import("shared").then((function(e){return e.aY}));case"../shared/translations/locales/en-us.json":return import("shared").then((function(e){return e.aZ}));case"../shared/translations/locales/en-x-dev.json":return import("shared").then((function(e){return e.a_}));case"../shared/translations/locales/en-x-keys.json":return import("shared").then((function(e){return e.a$}));case"../shared/translations/locales/en-x-obsolete.json":return import("shared").then((function(e){return e.b0}));case"../shared/translations/locales/en-x-pseudo.json":return import("shared").then((function(e){return e.b1}));case"../shared/translations/locales/en-x-test.json":return import("shared").then((function(e){return e.b2}));case"../shared/translations/locales/es-419.json":return import("shared").then((function(e){return e.b3}));case"../shared/translations/locales/es-ar.json":return import("shared").then((function(e){return e.b4}));case"../shared/translations/locales/es-cl.json":return import("shared").then((function(e){return e.b5}));case"../shared/translations/locales/es-es.json":return import("shared").then((function(e){return e.b6}));case"../shared/translations/locales/es-mx.json":return import("shared").then((function(e){return e.b7}));case"../shared/translations/locales/es-pe.json":return import("shared").then((function(e){return e.b8}));case"../shared/translations/locales/es.json":return import("shared").then((function(e){return e.b9}));case"../shared/translations/locales/et.json":return import("shared").then((function(e){return e.ba}));case"../shared/translations/locales/eu.json":return import("shared").then((function(e){return e.bb}));case"../shared/translations/locales/fa-af.json":return import("shared").then((function(e){return e.bc}));case"../shared/translations/locales/fa.json":return import("shared").then((function(e){return e.bd}));case"../shared/translations/locales/fi.json":return import("shared").then((function(e){return e.be}));case"../shared/translations/locales/fil.json":return import("shared").then((function(e){return e.bf}));case"../shared/translations/locales/fo.json":return import("shared").then((function(e){return e.bg}));case"../shared/translations/locales/fr-ca.json":return import("shared").then((function(e){return e.bh}));case"../shared/translations/locales/fr-dz.json":return import("shared").then((function(e){return e.bi}));case"../shared/translations/locales/fr-mu.json":return import("shared").then((function(e){return e.bj}));case"../shared/translations/locales/fr.json":return import("shared").then((function(e){return e.bk}));case"../shared/translations/locales/ga.json":return import("shared").then((function(e){return e.bl}));case"../shared/translations/locales/he.json":return import("shared").then((function(e){return e.bm}));case"../shared/translations/locales/hi.json":return import("shared").then((function(e){return e.bn}));case"../shared/translations/locales/hr.json":return import("shared").then((function(e){return e.bo}));case"../shared/translations/locales/hu.json":return import("shared").then((function(e){return e.bp}));case"../shared/translations/locales/hy.json":return import("shared").then((function(e){return e.bq}));case"../shared/translations/locales/id.json":return import("shared").then((function(e){return e.br}));case"../shared/translations/locales/is.json":return import("shared").then((function(e){return e.bs}));case"../shared/translations/locales/it-ch.json":return import("shared").then((function(e){return e.bt}));case"../shared/translations/locales/it.json":return import("shared").then((function(e){return e.bu}));case"../shared/translations/locales/ja.json":return import("shared").then((function(e){return e.bv}));case"../shared/translations/locales/ka.json":return import("shared").then((function(e){return e.bw}));case"../shared/translations/locales/kk.json":return import("shared").then((function(e){return e.bx}));case"../shared/translations/locales/kl-dk.json":return import("shared").then((function(e){return e.by}));case"../shared/translations/locales/km.json":return import("shared").then((function(e){return e.bz}));case"../shared/translations/locales/ko.json":return import("shared").then((function(e){return e.bA}));case"../shared/translations/locales/ku.json":return import("shared").then((function(e){return e.bB}));case"../shared/translations/locales/ky.json":return import("shared").then((function(e){return e.bC}));case"../shared/translations/locales/lt.json":return import("shared").then((function(e){return e.bD}));case"../shared/translations/locales/lv.json":return import("shared").then((function(e){return e.bE}));case"../shared/translations/locales/mk.json":return import("shared").then((function(e){return e.bF}));case"../shared/translations/locales/mn.json":return import("shared").then((function(e){return e.bG}));case"../shared/translations/locales/ms.json":return import("shared").then((function(e){return e.bH}));case"../shared/translations/locales/mt.json":return import("shared").then((function(e){return e.bI}));case"../shared/translations/locales/my.json":return import("shared").then((function(e){return e.bJ}));case"../shared/translations/locales/ne.json":return import("shared").then((function(e){return e.bK}));case"../shared/translations/locales/nl-be.json":return import("shared").then((function(e){return e.bL}));case"../shared/translations/locales/nl.json":return import("shared").then((function(e){return e.bM}));case"../shared/translations/locales/no.json":return import("shared").then((function(e){return e.bN}));case"../shared/translations/locales/pl.json":return import("shared").then((function(e){return e.bO}));case"../shared/translations/locales/pt-br.json":return import("shared").then((function(e){return e.bP}));case"../shared/translations/locales/pt.json":return import("shared").then((function(e){return e.bQ}));case"../shared/translations/locales/ro-md.json":return import("shared").then((function(e){return e.bR}));case"../shared/translations/locales/ro.json":return import("shared").then((function(e){return e.bS}));case"../shared/translations/locales/ru.json":return import("shared").then((function(e){return e.bT}));case"../shared/translations/locales/si.json":return import("shared").then((function(e){return e.bU}));case"../shared/translations/locales/sk.json":return import("shared").then((function(e){return e.bV}));case"../shared/translations/locales/sl.json":return import("shared").then((function(e){return e.bW}));case"../shared/translations/locales/sq.json":return import("shared").then((function(e){return e.bX}));case"../shared/translations/locales/sr-me.json":return import("shared").then((function(e){return e.bY}));case"../shared/translations/locales/sr.json":return import("shared").then((function(e){return e.bZ}));case"../shared/translations/locales/sv.json":return import("shared").then((function(e){return e.b_}));case"../shared/translations/locales/sw-ke.json":return import("shared").then((function(e){return e.b$}));case"../shared/translations/locales/ta.json":return import("shared").then((function(e){return e.c0}));case"../shared/translations/locales/th.json":return import("shared").then((function(e){return e.c1}));case"../shared/translations/locales/tr.json":return import("shared").then((function(e){return e.c2}));case"../shared/translations/locales/uk.json":return import("shared").then((function(e){return e.c3}));case"../shared/translations/locales/ur-pk.json":return import("shared").then((function(e){return e.c4}));case"../shared/translations/locales/ur.json":return import("shared").then((function(e){return e.c5}));case"../shared/translations/locales/uz.json":return import("shared").then((function(e){return e.c6}));case"../shared/translations/locales/vi.json":return import("shared").then((function(e){return e.c7}));case"../shared/translations/locales/zh-cn.json":return import("shared").then((function(e){return e.c8}));case"../shared/translations/locales/zh-tw.json":return import("shared").then((function(e){return e.c9}));default:return new Promise((function(n,s){("function"==typeof queueMicrotask?queueMicrotask:setTimeout)(s.bind(null,new Error("Unknown variable dynamic import: "+e)))}))}}(`../shared/translations/locales/${r}.json`)]),x.render(a.jsx(g,{theme:w(n),children:a.jsx(y,{helpCenterPath:t,children:a.jsx(In,{...s,helpCenterPath:t})})}),e)}export{Tn as renderApprovalRequest,ce as renderApprovalRequestList};
