import{_aswe}from"./BasicModal.vue_vue_type_style_index_0_lang-6969d1dc.js";import{_asye,uasxe}from"./useBaseTable-2f44456a.js";import{_aske}from"./BasicMainCard-e958eff9.js";import{_asTe}from"./BasicInput.vue_vue_type_style_index_0_lang-1e71e6d8.js";import{_asIe}from"./button.vue_vue_type_style_index_0_lang-c84b0596.js";import{IasA}from"./Icon-e9d21126.js";import{tasUe}from"./useDataTime-c5fd0475.js";import{_asRe,Iasne,Jasie,KasCe,Oasoe,dasBe,iasf,xasAe,oasx,cask,eass,wasd,basn,fasN,LasSe,lash,tasLe,nasS,CasY,Has_,MasMe}from"./index-88b436a3.js";import{gasL}from"./convert-2ad76038.js";import{nasQ}from"./textUtils-c37780ad.js";import{gasZ}from"./index-eb78e5b4.js";import{MasEe}from"./index-801e70c1.js";import{Sas$e}from"./index-77cb2497.js";import{Casje}from"./index-6971af25.js";import{IasDe}from"./index-5b1d7174.js";import{TasF}from"./isSymbol-5adcf314.js";import{Uasee}from"./index-58f8102d.js";import"./updateLocale-50b6b1dc.js";import"./index-371b21ab.js";import"./_plugin-vue_export-helper-0965689e.js";import"./shallowequal-a265b4c4.js";import"./vnode-4c3cf924.js";import"./useState-89585daf.js";import"./useMemo-9783b0bd.js";import"./FormItemContext-0dc63d45.js";import"./omit-c69ba12d.js";import"./lodash-ff1cad4c.js";import"./BaseSwitch.vue_vue_type_script_setup_true_lang-8738a2db.js";import"./index-59dbbd66.js";import"./Badge-b5f795c2.js";import"./isNumeric-3f69e2aa.js";import"./index-e3b71aec.js";import"./index-608635af.js";import"./index-7fdb0173.js";import"./toArray-20aa7010.js";import"./SearchOutlined-a51da12b.js";import"./pickAttrs-fd92707c.js";import"./index-70730f49.js";import"./isMobile-e2e89480.js";import"./index-4c23d157.js";import"./Grid-3500d868.js";import"./index-3056cee8.js";import"./useRefs-b589f2c4.js";import"./_flatRest-bfa472d2.js";import"./index-ab792bfc.js";import"./Col-dbdf0e50.js";import"./styleChecker-e121d19f.js";import"./isPlainObject-6af67cf0.js";import"./usePrice-bc935b83.js";import"./DialogWrap-540d386d.js";import"./index-4ad375f9.js";import"./css-aae66f86.js";import"./index-ad76e424.js";import"./index-f6397275.js";constte=[{title:"ردیف",dataIndex:"id",key:"id",filterable:!1,width:70,align:"center",customRender:o=>o.record.index+1},{title:"عنوان",dataIndex:"title",key:"title"},{title:"عنوان ویدیو",dataIndex:"video_title",key:"video_title",customRender:o=>o.record.video_title||"-"},{title:"اسلایدر خانه",dataIndex:"show_on_home",key:"show_on_home",align:"center",width:120,customRender:o=>o.record.show_on_home?"بله":"خیر"},{title:"زمان ایجاد",dataIndex:"created_at",key:"created_at",customRender:o=>Ue(o.record.created_at)},{title:"عملیات",dataIndex:"action",key:"action",slot:"action",filterable:!1,align:"center"}];asyncfunctionOe(o){constm=awaitne("announcements",o);returnArray.isArray(m)?m:[m]}asyncfunctionae(o,m){constu=awaitie("announcements",o,{...m,updated_at:newDate().toISOString()});returnArray.isArray(u)?u:[u]}asyncfunctionze(o){awaitCe("announcements",o)}asyncfunctionGe(o){const{TableEngineRequest:m}=awaitRe(()=>import("./buildSupabaseQuery-073609fa.js"),["assets/buildSupabaseQuery-073609fa.js","assets/index-88b436a3.js","assets/index-ceed3b68.css"]),u={...o};!u.sort&&!u.order&&(u.order="-id");constc=awaitm(u,"announcements");try{if(Array.isArray(c==null?void0:c.rows)){constw=u.page||1,O=u.limit||20,z=(w-1)*O,G=c.rows.map((v,H)=>({...v,title:v.title??"",description:v.description??"",video_title:v.video_title??"",thumbnail:v.thumbnail??null,banner:v.banner??null,aparat_embed_code:v.aparat_embed_code??"",show_on_home:v.show_on_home!==!1,index:z+H}));return{...c,rows:G}}}catch(w){console.error("[getAnnouncementsTable]",w)}returnc}constle="home_greeting_subtitle",V="امروز هم یه ماجراجویی تازه داریم!";asyncfunctionHe(o,m){varc,w;constu=awaitoe("configs",{filters:[{field:"key",op:"eq",value:o}],limit:1,page:1});if((w=(c=u.rows)==null?void0:c[0])!=null&&w.id){awaitie("configs",u.rows[0].id,{value:m});return}awa