1import{G as e,da as f,D as x,z as h,F as w,ag as m,B as j,e8 as b,T as v,U as u,dH as g,e9 as y,ea as N,eb as k}from"./index-CL22zKs4.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};s.SENTRY_RELEASE={id:"[email protected]"};var a=new s.Error().stack;a&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[a]="756fa238-fa6f-4bbd-9a78-e99d83eecd64",s._sentryDebugIdIdentifier="sentry-dbid-756fa238-fa6f-4bbd-9a78-e99d83eecd64")}catch{}})();const T=({row:s,index:a,onClick:n})=>{const[r,i]=x.useState(!1),t=l=>l.isLoading?"fa-circle-o-notch fa-spin":l.isActive?"fa-check":"fa-close";return e.jsxs(e.Fragment,{children:[e.jsx("li",{className:"mb-[0.188rem] flex w-full grow flex-row flex-wrap bg-white py-4",children:e.jsx("div",{className:"w-full basis-full",children:e.jsxs("div",{role:"presentation",className:"flex w-full flex-nowrap",onClick:()=>{i(!r)},children:[e.jsx("div",{className:"w-8/12 shrink grow-0 basis-8/12 font-bold",children:s.section||`L${a+1} - Loading`}),e.jsxs("div",{className:"w-3/12 basis-3/12 shrink grow-0 text-right mobile:w-2/12 mobile:basis-2/12","data-test":"manager-sub-item",children:[s.completeCount||0," / ",s.checkList.length||0]}),e.jsx("div",{className:"w-1/12 basis-1/12 shrink grow-0 text-right mobile:w-2/12 mobile:basis-2/12",children:e.jsx("span",{style:{width:"1%"},children:e.jsx("i",{"data-test":"managerExpandIcon",className:f("fa",{"fa-caret-up":r,"fa-caret-down":!r}
1),"aria-label":"expand-toggle"})})})]})})}),r?e.jsx("li",{className:"flex w-full grow flex-row flex-wrap",children:e.jsx("div",{className:"w-full basis-full",children:s.checkList.map(l=>e.jsxs("div",{role:"presentation",className:"flex w-full grow flex-row flex-wrap border-b border-[#d8e2e8] bg-white py-4",onClick:()=>n(l),children:[e.jsxs("div",{className:"w-10/12 basis-10/12",children:[e.jsx("h6",{children:l.title}),e.jsx("div",{children:l.detail})]}),e.jsx("div",{className:"w-2/12 basis-2/12 text-right",children:e.jsx("span",{children:e.jsx("i",{className:f("fa",t(l)),"aria-label":"icon"})})})]},l._id))})}):null]})},L=s=>{const{checkList:a,handleToggleRow:n}=s;return a.length?e.jsx("ul",{className:f("border-t",{"locked pulse":!a[0].section}),children:a.map((r,i)=>e.jsx(T,{onClick:n,row:r,index:i},r.section))}):e.jsx("h1",{children:"No list available at this moment"})},E=()=>{const s=h(w),a=h(m),n=h(j),[r,i]=x.useState([]),t=n==="parent",l=()=>{if(!a){g();return}y(a,s?._id).then(d=>{const c=d;N(c,o=>{o.section=(o.section||"").replace(/^Level /,"L")}),i(c),g()})};x.useEffect(()=>{b()&&l()},[]);const p=async(d,c)=>{try{await k(a,d._id,!d.isActive,c),l()}catch(o){console.error(o)}};return e.jsxs("div",{className:"grit driving-manager",children:[e.jsx("header",{className:"header flex w-full flex-row flex-wrap grow py-[2.875rem]",children:e.jsxs("div",{className:"w-full basis-full mb-5",children:[e.jsx(v,{as:"h1",size:"xxlarge",children:"Driving Manager"}),t?e.jsxs(u,{children:[e.jsx("span",{children:"This handy checklist will help you and your student plan in-car lessons. This optional tool suggests tasks your student should practice to meet behind-the-wheel requirements and prepare for their driving test."}),e.jsxs("a",{href:"https://d1u7daj727sadp.cloudfront.net/documents/TX.PTDE.drivingManagerChecklist.pdf",target:"_BLANK",rel:"noreferrer",children:["Â Download ",e.jsx("i",{className:"fa fa-file-pdf-o"})]}),e.jsx("span",{children:"."})]}):null,t?null:e.jsxs(u,{children:[e.jsx("span",{children:"This handy checklist will help you and your parent plan in-car lessons. This optional tool suggests driving tasks you should practice to meet behind-the-wheel requirements and prepare for your driving test."}),e.jsxs("a",{href:"https://d1u7daj727sadp.cloudfront.net/documents/TX.PTDE.drivingManagerChecklist.pdf",target:"_BLANK",rel:"noreferrer",children:["Â Download ",e.jsx("i",{className:"fa fa-file-pdf-o"})]}),e.jsx("span",{children:"."})]})]})}),e.jsx("div",{className:"flex w-full flex-row flex-wrap grow overflow-hidden py-5 text-content-regular",children:e.jsx("div",{className:"w-full basis-full",children:r.length?e.jsx(L,{handleToggleRow:p,checkList:r}):null})})]})};export{E as default}; 2//# sourceMappingURL=Manager-ZcK9hlAi.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.