1import{_ as j}from"./DXGLmJY7.js";import{d as G,u as x,i as I,x as B,o as u,b as g,w as r,I as D,a as i,C as h,g as n,dd as M,J as k,H as O,de as T,E as f,c as y,f as E,l as $,r as U,a0 as b,e as A,m as S,a2 as N,az as q,F as C,j as z,aZ as L,ai as R,ac as H}from"./_Rr8vU5y.js";import{_ as J}from"./DucA4IqU.js";import{_ as P}from"./DHRr2aNY.js";import{g as Z,h as K,I as Q}from"./hj15J9Ji.js";import{a as W,b as X,c as Y}from"./Bgt8MC1I.js";import{u as F}from"./DJHVB1s2.js";import{_ as ee}from"./DMqdnFH1.js";import"./BAwkImlE.js";import"./kYBy0zob.js";import"./CpqTNNsh.js";import"./BHoAZNo1.js";import"./DFkmHt5O.js";const te={class:"font-bold flex items-center space-x-2 pb-3"},oe={key:0,class:"p-4 md:w-1/2"},ae={class:"flex py-4 space-x-2"},ne=G({__name:"item",props:{modelValue:{type:Object,required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(p){const e=x(p,"modelValue"),t=U(),d=U();function m(){console.log(e.value),t.value=new K(e.value)}async function o(){t.value&&(await W(t.value),b().add({color:"success",title:"Gespeichert"}),F().loadGame(e.value.game_id))}async function V(){try{if(!t.value)return;if((await X(t.value.id)).success)b().add({color:"success",title:"Entwickler entfernt"}),F().loadGame(e.value.game_id);else throw Error()}catch{b().add({color:"error",title:"Entwickler kann nicht entfernt werden"})}}return I(()=>{B(e,()=>{e.value&&m()}),m()}),(s,a)=>{const l=h,c=J,v=E,w=P;return u(),g(w,{open:n(d),"onUpdate:open":a[1]||(a[1]=_=>$(d)?d.value=_:null)},{content:r(()=>[n(t)?(u(),y("div",oe,[e.value&&e.value.tasks?(u(),g(v,{key:0,label:"Aufgaben"},{default:r(()=>[i(c,{modelValue:n(t).tasks,"onUpdate:modelValue":a[0]||(a[0]=_=>n(t).tasks=_)},null,8,["modelValue"])]),_:1})):f("",!0),D("div",ae,[i(l,{color:"success",onClick:o},{default:r(()=>[...a[3]||(a[3]=[k("Speichern",-1)])]),_:1}),i(l,{color:"error",variant:"outline",onClick:V},{default:r(()=>[...a[4]||(a[4]=[k("Entfernen",-1)])]),_:1})])])):f("",!0)]),default:r(()=>[D("div",te,[i(l,{color:"neutral",variant:"ghost",icon:"icon_arrow_down"in s?s.icon_arrow_down:n(M),ui:{leadingIcon:n(d)?"rotate-180":""}},{default:r(()=>[k(O(e.value.user.username),1)]),_:1},8,["icon","ui"]),e.value.status!==("DeveloperStatus"in s?s.DeveloperStatus:n(Z)).ACTIVE?(u(),g(l,{key:0,variant:"ghost",color:"info",icon:"icon_
1invite"in s?s.icon_invite:n(T)},{default:r(()=>[...a[2]||(a[2]=[k("Invited",-1)])]),_:1},8,["icon"])):f("",!0)])]),_:1},8,["open"])}}}),se=Object.assign(ne,{__name:"FeatureGameDeveloperEditItem"}),le={class:"flex flex-col space-y-4"},re=G({__name:"add",props:S({game_id:{type:String,required:!0}},{modelValue:{type:Boolean,required:!0},modelModifiers:{}}),emits:S(["success"],["update:modelValue"]),setup(p,{emit:e}){const t=x(p,"modelValue"),d=p,m=N({}),o=U();s();async function V(){if(!o.value)return;const a=await Y(o.value);if(console.log(a),a&&a.success)F().loadGame(d.game_id);else throw b().add({title:"Nutzer nicht gefunden"}),Error()}function s(){o.value=new Q(d.game_id)}return I(()=>{B(t,()=>{t.value&&s()})}),(a,l)=>{const c=A,v=E,w=q;return n(o)?(u(),g(w,{key:0,open:t.value,"onUpdate:open":l[2]||(l[2]=_=>t.value=_),schema:n(m),initialState:n(o),onSubmit:V,title:"Entwickler einladen",submitButtonText:"Einladen"},{default:r(()=>[D("div",le,[i(v,{class:"w-full",label:"Username"},{default:r(()=>[i(c,{modelValue:n(o).username,"onUpdate:modelValue":l[0]||(l[0]=_=>n(o).username=_),class:"w-full",autofocus:"",onFocus:l[1]||(l[1]=_=>_.target.select())},null,8,["modelValue"])]),_:1})])]),_:1},8,["open","schema","initialState"])):f("",!0)}}}),ue=Object.assign(re,{__name:"FeatureGameDeveloperFormAdd"}),ie={class:"flex flex-col space-y-4 divide-y divide-neutral-700"},de=G({__name:"list",props:{modelValue:{type:Object,required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(p){const e=x(p,"modelValue"),t=U(!1);function d(){t.value=!0}return(m,o)=>{const V=se,s=h,a=ue;return u(),y("div",ie,[(u(!0),y(C,null,z(e.value.developers,(l,c)=>(u(),y(C,null,[e.value.developers[c]?(u(),g(V,{key:0,modelValue:e.value.developers[c],"onUpdate:modelValue":v=>e.value.developers[c]=v},null,8,["modelValue","onUpdate:modelValue"])):f("",!0)],64))),256)),D("div",null,[i(s,{icon:"icon_add"in m?m.icon_add:n(L),onClick:d},{default:r(()=>[...o[1]||(o[1]=[k("Entwickler einladen",-1)])]),_:1},8,["icon"]),i(a,{modelValue:n(t),"onUpdate:modelValue":o[0]||(o[0]=l=>$(t)?t.value=l:null),game_id:e.value.id},null,8,["modelValue","game_id"])])])}}}),me=Object.assign(de,{__name:"FeatureGameDeveloperEditList"}),ce={key:0,class:"md:mx-auto md:w-2/3"},Ge=G({__name:"index",async setup(p){let e,t;const m=R().params.game_id,o=([e,t]=H(()=>F().getGame(m)),e=await e,t(),e);return(V,s)=>{const a=j,l=me,c=E,v=ee;return n(o)?(u(),g(v,{key:0},{header:r(()=>[i(a,{title:"Entwickler"})]),body:r(()=>[n(o)?(u(),y("div",ce,[i(c,{size:"xl"},{default:r(()=>[i(l,{modelValue:n(o),"onUpdate:modelValue":s[0]||(s[0]=w=>$(o)?o.value=w:null),class:"pt-8"},null,8,["modelValue"])]),_:1})])):f("",!0)]),_:1})):f("",!0)}}});export{Ge 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.