import{_aswe}from"./BasicModal.vue_vue_type_style_index_0_lang-c3b69d02.js";import{_asye,uasxe}from"./useBaseTable-e35ecaa9.js";import{_aske}from"./BasicMainCard-4c879cc2.js";import{_asTe}from"./BasicInput.vue_vue_type_style_index_0_lang-9a0053be.js";import{_asIe}from"./button.vue_vue_type_style_index_0_lang-b32e1136.js";import{IasA}from"./Icon-85823aa3.js";import{tasUe}from"./useDataTime-c7be2668.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-90ac1a44.js";import{gasL}from"./convert-2ad76038.js";import{nasQ}from"./textUtils-c37780ad.js";import{gasZ}from"./index-ca449155.js";import{MasEe}from"./index-a413fea1.js";import{Sas$e}from"./index-93d9312f.js";import{Casje}from"./index-788f312f.js";import{IasDe}from"./index-027c2128.js";import{TasF}from"./isSymbol-9094e8b7.js";import{Uasee}from"./index-e50485ad.js";import"./updateLocale-cec40f3d.js";import"./index-cfa536c5.js";import"./_plugin-vue_export-helper-8ee86600.js";import"./shallowequal-36516cfd.js";import"./vnode-b0455438.js";import"./useState-64f2823f.js";import"./useMemo-9928f29b.js";import"./FormItemContext-64f846db.js";import"./omit-84d71e15.js";import"./lodash-07b825be.js";import"./BaseSwitch.vue_vue_type_script_setup_true_lang-fb5041dc.js";import"./index-95b42b3e.js";import"./Badge-54a9cc4e.js";import"./isNumeric-3f69e2aa.js";import"./index-5f5223b4.js";import"./index-c0eeee91.js";import"./index-a2503c07.js";import"./toArray-3936b2d5.js";import"./SearchOutlined-0eaaa97a.js";import"./pickAttrs-ba13e92c.js";import"./index-9869a66e.js";import"./isMobile-e2e89480.js";import"./index-bb804fdd.js";import"./Grid-839ef6d1.js";import"./index-4d938e91.js";import"./useRefs-2a883b79.js";import"./_flatRest-f2577aae.js";import"./index-109c99be.js";import"./Col-fddaa6b7.js";import"./styleChecker-1445806f.js";import"./isPlainObject-aab367ce.js";import"./usePrice-bc935b83.js";import"./DialogWrap-6616a498.js";import"./index-90f5ddad.js";import"./css-aae66f86.js";import"./index-03d99677.js";import"./index-ebd9fdbb.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-c046d1a6.js"),["assets/buildSupabaseQuery-c046d1a6.js","assets/index-90ac1a44.js","assets/index-0643191e.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