import{_ as b}from"./SmartDataTable-2Nc3Ohem.js";import{d,H as u,F as f,f as c,h as p,i as o,c as n,v as a,cs as g,O as v,D as h,V as y,y as x,P as k}from"./index-C5GbdPxY.js";import{j as V}from"./index.es-D8yUKOQT.js";import{a as q}from"./support-CgN-fv-d.js";import{V as w}from"./VMenu-CT0Fri-T.js";import{c as C,a as B}from"./VCard-DptrO3GI.js";import{V as T}from"./VChip-CsS_5IS6.js";import"./VAvatar-RkAR0u0e.js";import"./VImg-BlqLjeEy.js";import"./VSelect-vtfYszIh.js";import"./VTextField-DxEUpn3-.js";import"./index-XcTykuv2.js";import"./forwardRefs-CB8NoG9r.js";import"./VList-C3dIUnee.js";import"./VVirtualScroll-BUlcGoHW.js";import"./getScrollParent-DE35ecf2.js";import"./confirmDialog-CDDTmj30.js";import"./VDialog-Dr29crN8.js";import"./VOverlay-DlJb3QlW.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./lodash-kem28dbC.js";import"./_commonjsHelpers-_d1bhYXs.js";import"./VForm-BZc3SavJ.js";import"./VCheckbox-rNAD_QU_.js";import"./VDatePicker-DHBX-k2T.js";import"./VSpacer-79sITyKz.js";import"./VBadge-DZHesqMo.js";import"./VTooltip-DPhSY2Qe.js";import"./TableAgent.vue_vue_type_script_setup_true_lang-XA6R7TPe.js";import"./TableEnum.vue_vue_type_script_setup_true_lang-5ITYgflT.js";import"./TableStatus.vue_vue_type_script_setup_true_lang-BRbfAU0T.js";import"./RoleBadge.vue_vue_type_script_setup_true_lang-Ctl8Qye7.js";import"./VDataTable-BFiF8jPV.js";import"./VTable-M43pjJD_.js";import"./filter-DERJvhSS.js";const z=d({__name:"TableQrCode",props:{item:{}},setup(s){const e=s,{t}=u(),r=f(()=>q(e.item.slug));return(i,l)=>(p(),c(w,{location:"top",offset:"8"},{activator:o(({props:m})=>[n(T,v({class:"cursor-pointer",color:"default",size:"small"},m),{default:o(()=>[n(y,{class:"cursor-pointer text-medium-emphasis",icon:"tabler-qrcode"}),h("   "+x(a(t)("menu::online_menus.view_qrcode")),1)]),_:2},1040)]),default:o(()=>[n(C,null,{default:o(()=>[n(B,{class:"text-center pa-2"},{default:o(()=>[n(a(V),{"background-options":{color:"#ffffff",round:0},"button-name":a(t)("admin::admin.buttons.download"),"corners-dot-options":{type:"",color:"#4d4d4d"},"corners-square-options":{type:"extra-rounded",color:"#4d4d4d"},"dots-options":{type:"extra-rounded",color:"#f57c00",roundSize:!0,gradient:null},download:!0,"download-button":"v-btn v-theme--light bg-primary v-btn--density-default elevation-0 v-btn--size-small v-btn--variant-flat","download-options":{name:i.item.name,extension:"png"},"file-ext":"png",height:250,image:a(g),"image-options":{hideBackgroundDots:!0,imageSize:.4,margin:0},"qr-options":{typeNumber:0,mode:"Byte",errorCorrectionLevel:"H"},value:a(r),width:250},null,8,["button-name","download-options","image","value"])]),_:1})]),_:1})]),_:1}))}}),pe=d({__name:"Index",setup(s){const{t:e}=u(),{user:t}=k(),r=[{title:e("menu::online_menus.table.name"),value:"name",sortable:!0},{title:e("branch::branches.table.branch"),value:"branch.name",sortable_key:"branch_id",sortable:!0,hidden:t==null?void 0:t.assigned_to_branch},{title:e("menu::online_menus.table.menu"),value:"menu.name",sortable_key:"menu_id",sortable:!0},{title:e("menu::online_menus.table.slug"),value:"slug",sortable:!0},{title:e("admin::admin.table.activation"),value:"is_active",sortable:!0},{title:e("menu::online_menus.table.qrcode"),value:"qrcode"},{title:e("admin::admin.table.created_at"),value:"created_at",sortable:!0},{title:e("admin::admin.table.updated_at"),value:"updated_at",sortable:!0}],i=[{key:"edit"},{key:"destroy",confirm:{message:e("admin::admin.delete.confirmation_message"),confirmButtonText:e("admin::admin.delete.confirm_button_text")}}],l=[{key:"destroy",confirm:{message:e("admin::admin.delete.confirmation_message"),confirmButtonText:e("admin::admin.delete.confirm_button_text")}}],m={qrcode:{component:z}};return(D,S)=>{const _=b;return p(),c(_,{actions:i,"api-uri":"/v1/online-menus","bulk-actions":l,"cell-components":m,"header-actions":[{key:"create"}],headers:r,module:"menu",name:"online_menu",resource:"online_menus"})}}});export{pe as default};
