import{C as A,N as t,K as b,E as h,O as a,P as n,Q as o,S as r,R as c,am as B,a3 as _,u as s,at as g,bb as I}from"./vendor-BGtMsOoo.js";import{ae as q}from"./index-CRze-aDK.js";import{u as E}from"./order-summary.vue_vue_type_style_index_0_scoped_471240a6_lang-DB8A0s2y.js";import{_ as M}from"./address-selection.vue_vue_type_script_setup_true_lang-BjP7icJi.js";const O={class:"flex flex-col gap-6 lg:flex-row lg:gap-8"},P={class:"lg:w-3/5"},U={class:"space-y-3 lg:w-2/5"},D={class:"flex items-center gap-3 p-3 text-sm"},L={class:"flex items-center gap-3 p-3 text-sm"},Q=A({__name:"billing-details-section",props:{disabled:{type:Boolean}},setup(R){const{allItemsAreDigital:m,availablePaymentMethods:V}=q(),{billingAddressEqualsShipping:i,billingAddress:f,paymentMethod:y,onBillingAddressChange:k,setPaymentMethod:v,isPurchaseOrderNumberEnabled:C,purchaseOrderNumber:p}=E();return(e,d)=>{const $=t("VcLabel"),N=t("VcCheckbox"),u=t("VcImage"),w=t("VcSelect"),z=t("VcInput"),S=t("VcWidget");return h(),b(S,{title:e.$t("shared.checkout.billing_details_section.title"),"prepend-icon":"cash",size:"lg"},{default:a(()=>[n("div",O,[n("div",P,[o($,{required:""},{default:a(()=>[r(c(e.$t("shared.checkout.billing_details_section.labels.billing_address")),1)]),_:1}),n("div",{class:B(["grow divide-y rounded border",{"cursor-not-allowed bg-neutral-50":e.disabled}])},[s(m)?_("",!0):(h(),b(N,{key:0,modelValue:s(i),"onUpdate:modelValue":d[0]||(d[0]=l=>g(i)?i.value=l:null),disabled:e.disabled,name:"billingAddressEqualsShipping",class:"p-3"},{default:a(()=>[r(c(e.$t("shared.checkout.billing_details_section.labels.same_as_shipping_address")),1)]),_:1},8,["modelValue","disabled"])),o(s(M),{placeholder:!s(m)&&s(i)?e.$t("shared.checkout.shipping_details_section.links.select_address"):e.$t("shared.checkout.billing_details_section.links.select_address"),address:s(f),disabled:e.disabled,readonly:!s(m)&&s(i),class:"min-h-[3.313rem] px-3 py-1.5",onChange:s(k)},null,8,["placeholder","address","disabled","readonly","onChange"])],2)]),n("div",U,[o(w,{"model-value":s(y),label:e.$t("shared.checkout.billing_details_section.labels.payment_method"),items:s(V),disabled:e.disabled,size:"auto",required:"","test-id-dropdown":"payment-method-select",onChange:d[1]||(d[1]=l=>s(v)(l))},{placeholder:a(()=>[n("div",D,[o(u,{class:"size-12 rounded-sm bg-neutral-100",src:"select-payment.svg"}),r(" "+c(e.$t("common.placeholders.select_payment_method")),1)])]),selected:a(({item:l})=>[n("div",L,[o(u,{class:"size-12 rounded-sm",src:l.logoUrl},null,8,["src"]),r(" "+c(e.$t(`common.methods.payment_by_code.${l.code}`)),1)])]),item:a(({item:l})=>[o(u,{class:"size-12 rounded-sm",src:l.logoUrl},null,8,["src"]),r(" "+c(e.$t(`common.methods.payment_by_code.${l.code}`)),1)]),_:1},8,["model-value","label","items","disabled"]),o(I,{name:"slide-fade-top",mode:"in-out"},{default:a(()=>[s(C)?(h(),b(z,{key:0,modelValue:s(p),"onUpdate:modelValue":d[2]||(d[2]=l=>g(p)?p.value=l:null),modelModifiers:{trim:!0},placeholder:e.$t("common.placeholders.purchase_order_number"),disabled:e.disabled,name:"purchaseOrderNumber"},null,8,["modelValue","placeholder","disabled"])):_("",!0)]),_:1})])])]),_:1},8,["title"])}}});export{Q as _};
//# sourceMappingURL=billing-details-section.vue_vue_type_script_setup_true_lang-BJKcktNq.js.map
