import{C as f,N as i,K as y,E as C,O as t,P as d,Q as o,S as a,R as n,am as V,u as l}from"./vendor-BGtMsOoo.js";import{ae as $}from"./index-CRze-aDK.js";import{u as k}from"./order-summary.vue_vue_type_style_index_0_scoped_471240a6_lang-DB8A0s2y.js";import{_ as w}from"./address-selection.vue_vue_type_script_setup_true_lang-BjP7icJi.js";const z={class:"flex flex-col gap-6 lg:flex-row lg:gap-8"},S={class:"lg:w-3/5"},B={class:"flex items-center gap-3 p-3 text-sm"},N={class:"flex items-center gap-3 p-3 text-sm"},I=f({__name:"shipping-details-section",props:{disabled:{type:Boolean}},setup(M){const{availableShippingMethods:p}=$(),{deliveryAddress:m,shipmentMethod:h,onDeliveryAddressChange:g,setShippingMethod:_}=k();return(e,c)=>{const u=i("VcLabel"),r=i("VcImage"),b=i("VcSelect"),v=i("VcWidget");return C(),y(v,{title:e.$t("shared.checkout.shipping_details_section.title"),"prepend-icon":"truck",size:"lg"},{default:t(()=>[d("div",z,[d("div",S,[o(u,{required:""},{default:t(()=>[a(n(e.$t("shared.checkout.shipping_details_section.labels.shipping_address")),1)]),_:1}),d("div",{class:V(["grow divide-y rounded border",{"cursor-not-allowed bg-neutral-50":e.disabled}])},[o(l(w),{placeholder:e.$t("shared.checkout.shipping_details_section.links.select_address"),address:l(m),disabled:e.disabled,class:"min-h-18 px-3 py-1.5",onChange:l(g)},null,8,["placeholder","address","disabled","onChange"])],2)]),o(b,{"model-value":l(h),label:e.$t("shared.checkout.shipping_details_section.labels.shipping_method"),items:l(p),disabled:e.disabled,size:"auto","item-size":"lg",class:"lg:w-2/5",required:"","test-id-dropdown":"shipping-method-select",onChange:c[0]||(c[0]=s=>l(_)(s))},{placeholder:t(()=>[d("div",B,[o(r,{class:"size-12 rounded-sm bg-neutral-100",src:"select-shipping.svg"}),a(" "+n(e.$t("common.placeholders.select_delivery_method")),1)])]),selected:t(({item:s})=>[d("div",N,[o(r,{class:"size-12 rounded-sm",src:s.logoUrl},null,8,["src"]),a(" "+n(e.$t(`common.methods.delivery_by_id.${s.id}`)),1)])]),item:t(({item:s})=>[o(r,{class:"size-12 rounded-sm",src:s.logoUrl},null,8,["src"]),a(" "+n(e.$t(`common.methods.delivery_by_id.${s.id}`)),1)]),_:1},8,["model-value","label","items","disabled"])])]),_:1},8,["title"])}}});export{I as _};
//# sourceMappingURL=shipping-details-section.vue_vue_type_script_setup_true_lang-CtkI8i2y.js.map
