import{e as k,B as b,D as m,c as o,o as a,s as x,k as r,H as g,a as t,z as n,m as i}from"./CGJ-iGzd.js";const v={__name:"status",props:["instance"],setup(c){const{$CustomAlert:u}=k();b();const e=c.instance;m();async function l(){await n.patch(`${i().public.BaseUrl}maghale/works/${e.work.id}/`,{status:e.work.status})}async function d(){await n.post(`${i().public.BaseUrl}maghale/works/`,{activity:e.id}).then(()=>{e.status=1,u("تغییرات ثبت شد",4)})}return(f,s)=>(a(),o("div",null,[r(e).work.status?x((a(),o("select",{key:0,id:"states","onUpdate:modelValue":s[0]||(s[0]=p=>r(e).work.status=p),onChange:l,class:"bg-zinc-50 border border-zinc-300 text-zinc-900 text-xs rounded-lg border-s-2 focus:ring-blue-500 focus:border-blue-500 block p-1 dark:bg-zinc-700 dark:border-zinc-600 dark:placeholder-zinc-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},s[1]||(s[1]=[t("option",{selected:"",value:1},"در صف مطالعه",-1),t("option",{selected:"",value:2},"در حال مطالعه",-1),t("option",{selected:"",value:3},"روزنامه‌وار",-1),t("option",{selected:"",value:4},"تنها کمی ابهام",-1),t("option",{selected:"",value:5},"مطالعه کامل",-1),t("option",{selected:"",value:6},"انصراف از مطالعه",-1)]),544)),[[g,r(e).work.status]]):(a(),o("button",{key:1,onClick:d,class:"bg-zinc-100 text-zinc-800 text-xs font-medium me-2 px-2.5 py-0.5 rounded-sm dark:bg-zinc-800 dark:text-zinc-400 border border-zinc-400"}," افزودن به لیست"))]))}};export{v as _};
