import{o as i,c as d,a as t,t as l,F as u,j as p,P as x,g as n,n as m,u as r,af as f,e as g,f as h,a7 as y}from"../vendor-3-7-99.js";import{a as b}from"../Page-3-7-99.js";import{_ as w}from"../CreditCard-3-7-99.js";import{i as $}from"../admin-app-3-7-99.js";import"../ajax-3-7-99.js";import"../MoneyFormat-3-7-99.js";import"../Loading-3-7-99.js";const v={class:"p-5 bg-white rounded flex flex-col shadow-md"},F=["textContent"],C={class:"flex flex-col gap-4"},k={class:"text-md font-semibold text-gray-900"},B={class:"text-sm"},j={__name:"Customer",props:["collection"],setup(e){const a=e;return(s,o)=>(i(),d("div",v,[t("div",{class:"text-blue-600 font-bold text-lg",textContent:l(s.$t("customer"))},null,8,F),o[0]||(o[0]=t("div",{class:"border border-[#F7F7F7] my-4"},null,-1)),t("div",C,[(i(),d(u,null,p(["customer_first_name","customer_last_name","customer_email","customer_phone","customer_address","customer_state","customer_city","customer_company_name","customer_tax_type","customer_tax_number","customer_tax_office"],c=>t("div",{key:c,class:"flex flex-col w-full gap-1"},[t("span",k,l(s.$t(c)),1),t("span",B,l(a.collection[c]),1)])),64))])]))}},D={class:"p-5 bg-white rounded flex flex-col shadow-md relative"},M={class:"flex items-center justify-between text-gray-400 text-xs"},N={class:"flex items-center gap-6"},S={class:"flex flex-col"},V={class:"text-gray-900",datetime:"collection.created"},q={class:"text-gray-400 text-[8px]"},z={class:"flex items-end gap-2"},A={class:"text-gray-400 text-[8px]"},E={class:"w-full text-sm text-left text-gray-500 relative"},L={class:"text-xs text-gray-700 bg-gray-50"},O={scope:"col",class:"px-6 py-3 w-2/12"},P={scope:"col",class:"px-6 py-3 w-2/12"},U={scope:"col",class:"px-6 py-3 w-2/12"},G={scope:"col",class:"px-6 py-3 w-2/12"},H={scope:"row",class:"px-6 py-4 font-medium text-gray-900 break-all"},I={class:"px-6 py-4"},J={class:"px-6 py-4"},K={class:"px-6 py-4"},Q={class:"px-6 py-4"},R={__name:"Detail",props:{collection:{type:Object,required:!0}},setup(e){const a=s=>{let o="bg-gray-100 bg-gray-800";switch(s){case"gpos_c_pending":o="bg-yellow-100 text-yellow-800";break;case"gpos_c_failed":o="bg-red-300 text-red-800 ";break;case"gpos_c_completed":o="bg-green-200 text-green-800";break}return o};return(s,o)=>{const c=x("MoneyFormat");return i(),d("div",D,[t("div",M,[t("div",N,[t("div",S,[t("time",V,l(e.collection.human_date_diff),1),t("span",q,l(e.collection.date),1)]),t("div",z,[n(r(f),{class:m(["w-5 h-5",e.collection.complated_maild_sent?"text-green-500":"text-red-500"])},null,8,["class"]),t("span",A,l(e.collection.complated_maild_sent?s.$t("email_sent"):s.$t("email_not_sent")),1)])]),t("span",{class:m(`${a(e.collection.status)} text-xs rounded-2xl px-4 py-2`)},l(s.$t(e.collection.status)),3)]),o[1]||(o[1]=t("div",{class:"border border-[#F7F7F7] my-4"},null,-1)),t("table",E,[t("thead",L,[t("tr",null,[o[0]||(o[0]=t("th",{scope:"col",class:"px-6 py-3 w-4/12"},null,-1)),t("th",O,l(s.$t("sub_total")),1),t("th",P,l(s.$t("tax_rate")),1),t("th",U,l(s.$t("tax_total")),1),t("th",G,l(s.$t("total")),1)])]),t("tbody",null,[t("tr",null,[t("td",H,l(e.collection.amount_name),1),t("td",I,[n(c,{number:e.collection.sub_total,currency:e.collection.currency},null,8,["number","currency"])]),t("td",J,l(e.collection.tax_rate)+"%",1),t("td",K,[n(c,{number:e.collection.tax_total,currency:e.collection.currency},null,8,["number","currency"])]),t("td",Q,[n(c,{number:e.collection.total,currency:e.collection.currency},null,8,["number","currency"])])])])])])}}},T={class:"w-full flex justify-between items-center"},W=["href"],X={class:"w-max flex gap-1 items-center my-4 cursor-pointer"},Y={class:"text-blue-600 font-bold text-xl"},Z={class:"grid grid-cols-3 gap-4"},tt={class:"col-span-2 flex flex-col gap-2"},et={class:"col-span-1"},st={__name:"App",setup(e){const a=window.gpos.collection,s=window.gpos.transaction,o=window.gpos.admin_url;return(c,_)=>(i(),g(b,{text:c.$t("collection_form"),href:"https://yardim.gurmehub.com/docs/pos-entegrator/?utm_source=wp_plugin&utm_medium=referal&utm_campaign=footer"},{default:h(()=>[t("div",T,[t("a",{href:`${r(o)}edit.php?post_type=gpos_collection`},[t("span",X,[n(r(y),{class:"text-blue-600 w-6 h-6"}),t("span",Y,"#"+l(r(a).id),1)])],8,W),_[0]||(_[0]=t("div",{class:"flex gap-2"},null,-1))]),t("div",Z,[t("div",tt,[n(R,{collection:r(a)},null,8,["collection"]),n(w,{transaction:r(s)},null,8,["transaction"])]),t("div",et,[n(j,{collection:r(a)},null,8,["collection"])])])]),_:1},8,["text"]))}};$(st);
