1import{u as xe,r as x,j as t,t as n,a as U,H as he}from"./app-CureB7I2.js";import{c as je,B as a,i as be}from"./sonner-DS-oxQwz.js";import{F as ge}from"./form-wrapper-dr2rd0X8.js";import{S as Ce}from"./submit-button-wrapper-CNQ7Q7E0.js";import{c as ne,a as ce,C as de,d as me}from"./card-ECwQ--TV.js";import{C as K}from"./checkbox-DaqbNDQS.js";import{I as Q}from"./input-group-field-vIu6q--9.js";import{L as ve}from"./label-CKKlw6fk.js";import{e as Se,b as ke,a as _e,c as ye,S as Ne}from"./select-DP3WWL8J.js";import{S as Ee}from"./submit-button-4IvwakJz.js";import{a as Ie}from"./authenticated-app-layout-PVpzO4_q.js";import{P as ze}from"./app-sidebar-menu-DyOvCAk0.js";import{P as De}from"./page-wrapper-D3-9B7Xr.js";import{M as Te}from"./main-BmMvoO9B.js";import{s as Fe,u as Le,r as Pe,d as we}from"./TaskStatusController-B2GC3Ov1.js";import"./app-IGD6Fi0a.js";import"./dialog-DJXJp60a.js";import"./check-C_ruieJP.js";import"./input-group-CXk2Mfly.js";import"./textarea-DDVQH_-2.js";import"./input-error-BGP44xy_.js";import"./dropdown-menu-PW3EihOL.js";import"./icons-DQgqlYOV.js";import"./app-header-layout-B66fdE_3.js";import"./index-5P6O-v8Q.js";import"./visual-viewport-lock-DInyObMc.js";import"./avatar-n9WbpfGv.js";import"./FileDownloadController-CdAZVNSt.js";function Be(o){const e=je.c(74),{statuses:h,can_manage:j}=o;let M;e[0]===Symbol.for("react.memo_cache_sentinel")?(M={name:"",color:"#64748b",is_default:!1,is_completed:!1},e[0]=M):M=e[0];const s=xe(M),[X,Y]=x.useState(null),[b,le]=x.useState(""),[g,ie]=x.useState("#64748b"),[C,oe]=x.useState(!1),[v,ae]=x.useState(!1),[Z,ee]=x.useState(null),[c,te]=x.useState("");let R;e[1]!==s?(R=l=>{l.preventDefault(),s.submit(Fe(),{onSuccess:()=>{n.success("Ðолонка Ñоздана"),s.reset()},onError:Ge})},e[1]=s,e[2]=R):R=e[2];const W=R;let $;e[3]===Symbol.for("react.memo_cache_sentinel")?($=l=>{Y(l.id),le(l.name),ie(l.color??"#64748b"),oe(l.is_default),ae(l.is_completed)},e[3]=$):$=e[3];const ue=$;let O;e[4]!==g||e[5]!==v||e[6]!==C||e[7]!==b?(O=l=>{U.put(Le.url(l),{name:b,color:g,is_default:C,is_completed:v},{onSuccess:()=>{n.success("Ðолонка обновлена"),Y(null)},onError:Ae})},e[4]=g,e[5]=v,e[6]=C,e[7]=b,e[8]=O):O=e[8];const re=O;let V;e[9]!==h?(V=(l,r)=>{const B=[...h].sort(qe),i=B.findIndex(fe=>fe.id===l),J=i+r;if(i<0||J<0||J>=B.length)return;const H=[...B],pe=H[i];H[i]=H[J],H[J]=pe,U.post(Pe.url(),{ordered_ids:H.map(Ve)},{onSuccess:Oe,onError:$e})},e[9]=h,e[10]=V):V=e[10];const q=V;let A;e[11]!==c?(A=l=>{if(l.tasks_count>0&&!c){n.error("ÐÑбеÑиÑе ÐºÐ¾Ð»Ð¾Ð½ÐºÑ Ð´Ð»Ñ Ð¿ÐµÑеноÑа задаÑ");return}U.delete(we.url(l.id),{data:{replacement_status_id:c?Number(c):null},onSuccess:()=>{n.success("Ðолонка Ñдалена"),ee(null),te("")},onError:Re})},e[11]=c,e[12]=A):A=e[12];const se=A;let S,k,_,y,N,d,m,E,u,I,p,z,D,f;if(e[13]!==j||e[14]!==se||e[15]!==s||e[16]!==Z||e[17]!==g||e[18]!==v||e[19]!==C||e[20]!==b||e[21]!==X||e[22]!==q||e[23]!==c||e[24]!==re||e[25]!==h||e[26]!==W){const l=[...h].sort(Me);e[41]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx(he,{title:"Ðолонки задаÑ"}),e[41]=p):p=e[41],y=De,_=ze,E="Ðолонки задаÑ",e[42]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx(Te,{}),e[42]=u):u=e[42],I=!0,N="col-span-full space-y-gos-6",e[43]===Symbol.for("react.memo_cache_sentinel")?(d=t.jsx(a,{variant:"outline",onClick:He,children:"РзадаÑам"}),e[43]=d):d=e[43],e[44]!==j||e[45]!==s||e[46]!==W?(m=j?t.jsxs(ne,{children:[t.jsx(ce,{children:t.jsx(de,{children:"ÐÐ¾Ð²Ð°Ñ ÐºÐ¾Ð»Ð¾Ð½ÐºÐ°"})}),t.jsx(me,{children:t.jsxs(ge,{onSubmit:W,children:[t.jsx(Q,{id:"name",name:"name",type:"text",label:"Ðазвание",value:s.data.name,onChange:r=>s.setData("name",r.target.value),error:s.errors.name,required:!0}),t.jsx(Q,{id:"color",name:"color",type:"color",label:"ЦвеÑ",value:s.data.color,onChange:r=>s.setData("color",r.target.value),error:s.errors.color}),t.jsxs("label",{className:"flex items-center gap-2",children:[t.jsx(K,{checked:s.data.is_default,onCheckedChange:r=>s.setData("is_default",r===!0)}),"Ðо ÑмолÑаниÑ"]}),t.jsxs("label",{className:"flex items-center gap-2",children:[t.jsx(K,{checked:s.data.is_completed,onCheckedChange:r=>s.setData("is_completed",r===!0)}),"ÐавеÑÑаÑÑаÑ"]}),t.jsx(Ce,{children:t.jsx(Ee,{isLoading:s.processing,children:"СоздаÑÑ ÐºÐ¾Ð»Ð¾Ð½ÐºÑ"})})]})})]}):null,e[44]=j,e[45]=s,e[46]=W,e[47]=m):m=e[47],k=ne,e[48]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsx(ce,{children:t.jsx(de,{children:"Ðолонки"})}),e[48]=f):f=e[48],S=me,z="space-y-4",D=l.map((r,B)=>t.jsxs("div",{className:"space-y-3 border-b border-border py-3 last:border-0",children:[X===r.id?t.jsxs("div",{className:"space-y-3",children:[t.jsx(Q,{id:`edit-name-${r.id}`,name:"name",type:"text",label:"Ðазвание",value:b,onChange:i=>le(i.target.value)}),t.jsx(Q,{id:`edit-color-${r.id}`,name:"color",type:"color",label:"ЦвеÑ",value:g,onChange:i=>ie(i.target.value)}),t.jsxs("label",{className:"flex items-center gap-2",children:[t.jsx(K,{checked:C,onCheckedChange:i=>oe(i===!0)}),"Ðо ÑмолÑаниÑ"]}),t.jsxs("label",{className:"flex items-center gap-2",children:[t.jsx(K,{checked:v,onCheckedChange:i=>ae(i===!0)}),"ÐавеÑÑаÑÑаÑ"]}),t.jsxs("div",{className:"flex flex-wrap gap-2",children:[t.jsx(a,{size:"sm",onClick:()=>re(r.id),children:"СоÑ
ÑаниÑÑ"}),t.jsx(a,{size:"sm",variant:"outline",onClick:()=>Y(null),children:"ÐÑмена"})]})]}):t.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-2",children:[t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx("span",{className:"inline-block size-4 rounded-full border border-border",style:{backgroundColor:r.color??"#64748b"}}),t.jsxs("div",{children:[t.jsx("p",{className:"font-medium",children:r.name}),t.jsxs("p",{className:"text-sm text-muted-foreground",children:["ÐадаÑ:"," ",r.tasks_count,r.is_default?" · по ÑмолÑаниÑ":"",r.is_completed?" · завеÑÑаÑÑаÑ":""]})]})]}),j?t.jsxs("div",{className:"flex flex-wrap gap-2",children:[t.jsx(a,{size:"sm",variant:"outline",disabled:B===0,onClick:()=>q(r.id,-1),children:"â"}),t.jsx(a,{size:"sm",variant:"outline",disabled:B===l.length-1,onClick:()=>q(r.id,1),children:"â"}),t.jsx(a,{size:"sm",variant:"secondary",onClick:()=>ue(r),children:"ÐзмениÑÑ"}),t.jsx(a,{size:"sm",variant:"destructive",onClick:()=>{ee(r.id),te("")},children:"УдалиÑÑ"})]}):null]}),Z===r.id?t.jsxs("div",{className:"space-y-2 rounded-gos-6 border border-destructive/30 p-gos-4",children:[t.jsxs(ve,{children:["Удаление колонки «",r.name,"»"]}),r.tasks_count>0?t.jsxs(Se,{value:c||void 0,onValueChange:te,children:[t.jsx(ke,{children:t.jsx(_e,{placeholder:"ÐеÑенеÑÑи задаÑи вâ¦"})}),t.jsx(ye,{children:l.filter(i=>i.id!==r.id).map(We)})]}):t.jsx("p",{className:"text-sm text-muted-foreground",children:"Рколонке Ð½ÐµÑ Ð·Ð°Ð´Ð°Ñ."}),t.jsxs("div",{className:"flex flex-wrap gap-2",children:[t.jsx(a,{size:"sm",variant:"destructive",onClick:()=>se(r),children:"ÐодÑвеÑдиÑÑ Ñдаление"}),t.jsx(a,{size:"sm",variant:"outline",onClick:()=>ee(null),children:"ÐÑмена"})]})]}):null]},r.id)),e[13]=j,e[14]=se,e[15]=s,e[16]=Z,e[17]=g,e[18]=v,e[19]=C,e[20]=b,e[21]=X,e[22]=q,e[23]=c,e[24]=re,e[25]=h,e[26]=W,e[27]=S,e[28]=k,e[29]=_,e[30]=y,e[31]=N,e[32]=d,e[33]=m,e[34]=E,e[35]=u,e[36]=I,e[37]=p,e[38]=z,e[39]=D,e[40]=f}else S=e[27],k=e[28],_=e[29],y=e[30],N=e[31],d=e[32],m=e[33],E=e[34],u=e[35],I=e[36],p=e[37],z=e[38],D=e[39],f=e[40];let T;e[49]!==S||e[50]!==z||e[51]!==D?(T=t.jsx(S,{className:z,children:D}),e[49]=S,e[50]=z,e[51]=D,e[52]=T):T=e[52];let F;e[53]!==k||e[54]!==T||e[55]!==f?(F=t.jsxs(k,{children:[f,T]}
1),e[53]=k,e[54]=T,e[55]=f,e[56]=F):F=e[56];let L;e[57]!==N||e[58]!==d||e[59]!==m||e[60]!==F?(L=t.jsxs("div",{className:N,children:[d,m,F]}),e[57]=N,e[58]=d,e[59]=m,e[60]=F,e[61]=L):L=e[61];let P;e[62]!==_||e[63]!==E||e[64]!==u||e[65]!==I||e[66]!==L?(P=t.jsx(_,{title:E,sidebarChildren:u,hideSidebarOnMobile:I,children:L}),e[62]=_,e[63]=E,e[64]=u,e[65]=I,e[66]=L,e[67]=P):P=e[67];let w;e[68]!==y||e[69]!==P?(w=t.jsx(y,{children:P}),e[68]=y,e[69]=P,e[70]=w):w=e[70];let G;return e[71]!==p||e[72]!==w?(G=t.jsxs(t.Fragment,{children:[p,w]}),e[71]=p,e[72]=w,e[73]=G):G=e[73],G}function We(o){return t.jsx(Ne,{value:String(o.id),children:o.name},o.id)}function He(){return U.get(be.url())}function Me(o,e){return o.sort_order-e.sort_order}function Re(){return n.error("Ðе ÑдалоÑÑ ÑдалиÑÑ ÐºÐ¾Ð»Ð¾Ð½ÐºÑ")}function $e(){return n.error("Ðе ÑдалоÑÑ Ð¸Ð·Ð¼ÐµÐ½Ð¸ÑÑ Ð¿Ð¾ÑÑдок")}function Oe(){return n.success("ÐоÑÑдок колонок обновлÑн")}function Ve(o){return o.id}function qe(o,e){return o.sort_order-e.sort_order}function Ae(){return n.error("Ðе ÑдалоÑÑ Ð¾Ð±Ð½Ð¾Ð²Ð¸ÑÑ ÐºÐ¾Ð»Ð¾Ð½ÐºÑ")}function Ge(o){const e=Object.values(o)[0];n.error("Ðе ÑдалоÑÑ ÑоздаÑÑ ÐºÐ¾Ð»Ð¾Ð½ÐºÑ",{description:e})}Be.layout=Ie;export{Be as default};
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.