import{bp as I,aX as T,ay as v,b$ as w,b0 as M,az as o,aj as N,bu as O,b4 as U,aB as q,bN as B,L as G,ao as e,aZ as S}from"./app-k0jcl5PQ.js";import{I as L}from"./DXJ2-V8v.chunk.js";import{u as V,P as E,M as H,a as k}from"./BLYja3A6.chunk.js";import{P as D}from"./5yz8RzTU.chunk.js";import{C as c}from"./_XP6hjk3.chunk.js";import{u as z,C as X}from"./DEJTLmQi.chunk.js";import{g as Z}from"./BNfTlqwB.chunk.js";import"./s-4A5pEU.chunk.js";import"./BAuuQuuB.chunk.js";import"./CnmbO5oy.chunk.js";import"./CT_eJKNn.chunk.js";import"./BhYYYlpK.chunk.js";import"./FGhEvk_q.chunk.js";import"./WCBjpMHJ.chunk.js";import"./DoFMWlew.chunk.js";import"./CMnqIsoM.chunk.js";import"./FIVgBuht.chunk.js";import"./B8hCUVHx.chunk.js";import"./CBHg5Ydb.chunk.js";import"./wCY37Ze3.chunk.js";import"./BFSC0Mx_.chunk.js";import"./V7wC9s5_.chunk.js";import"./CCtuxSlD.chunk.js";import"./CPXlV0fg.chunk.js";import"./DwDhXSrj.chunk.js";import"./CAxN5LKv.chunk.js";import"./DIAJ896Y.chunk.js";import"./BDviDDog.chunk.js";import"./fbx3ux4i.chunk.js";import"./BHzuHk-6.chunk.js";import"./B04URh0L.chunk.js";import"./DlQIAsvN.chunk.js";import"./U4M4wGTR.chunk.js";import"./D8qpyDLF.chunk.js";import"./Bh7bFXwG.chunk.js";const _="classrooms.classroomAssignments",p=G.encloseNamespace(_);function ws(u){var g,f,b,y;const h=I(),{hasPermissions:l}=T(),{hasShareFlowV2:n}=v(null),{isPlugin:C}=w(),j=M(),a=o(N.currentUser()),x=o(O.config()),P=o(((g=a.data)==null?void 0:g.isAuthenticated)&&U.yearGroups(a.data.customerId)),t=o(a.data&&c.getClassroom(u.id,a.data.id)),s=V({interactiveInsights:!0,shouldFetch:n,params:{type:[q.Classroom],scopeId:u.id}}),d=(b=(f=t.data)==null?void 0:f._integrations)==null?void 0:b.rostered;B({title:p("pageTitle",{classroomName:(y=t.data)==null?void 0:y.name})}),z(t);async function R(m,r,i){if(d)return;const F=m?c.pinClassroom:c.unpinClassroom;try{await j(F(t.data)),r()}catch{i()}}function A(){var r;const m=n&&l(S.ViewInsights)&&l(S.ViewAnalytics);return s.showPartialLoading?e.jsx(E,{}):s.sentShares.length?e.jsxs(e.Fragment,{children:[e.jsx(k,{sentShares:s.sentShares,sharedObjects:s.sharedObjects.items,shareRecipients:s.shareRecipients.items,interactivesPendingReview:s.interactivesPendingReview.itemsArr,getObjectActions:i=>Z({share:i.share,sharedObject:i.sharedObject,hasInsights:m,isPlugin:C,breakpoints:h}),groupByDateShared:!0,breakpoints:h,imageCdnUrl:(r=x.data)==null?void 0:r.imageCdnUrl,yearGroups:P.data}),(s.hasMore||s.isFetching)&&e.jsx(L,{isFetching:s.isFetching,fetchNext:s.fetchNext,nextCursor:s.nextCursor})]}):e.jsx(H,{heading:p("emptyStateHeading"),info:p("emptyStateInfo")})}return t.data?e.jsx(X,{classroom:t.data,currentUser:a.data,onTogglePin:R,activeTab:"assignments",isRostered:d,hasShareFlowV2:n,children:e.jsx("div",{className:"mt-3",children:A()})}):e.jsx(D,{})}export{ws as ClassroomAssignmentsView};
//# sourceMappingURL=B8-bkXaT.chunk.js.map
