import{s as l}from"./index.module.5fa78ceb.js";import{O as x}from"./index.4f243ca1.js";import{m as F,q as M,w as B,d as Y,S as A,R as Q,aC as j,v as S,Z as D,G as q,aW as z,Y as H,k as t,at as N,a1 as L,aF as I,au as X,y as K,l as r,a2 as Z,B as W}from"./index.879f7421.js";import{s as _}from"./function-call.3c67215d.js";import{C as $}from"./index.9a3a3b84.js";import{T as ee}from"./index.30499db4.js";const[te,E]=F("swipe-cell"),se={name:M(""),disabled:Boolean,leftWidth:B,rightWidth:B,beforeClose:Function,stopPropagation:Boolean};var ae=Y({name:te,props:se,emits:["open","close","click"],setup(s,{emit:u,slots:d}){let i,c,h;const g=A(),v=A(),T=A(),a=Q({offset:0,dragging:!1}),f=j(),k=e=>e.value?N(e).width:0,m=S(()=>D(s.leftWidth)?+s.leftWidth:k(v)),p=S(()=>D(s.rightWidth)?+s.rightWidth:k(T)),R=e=>{a.offset=e==="left"?m.value:-p.value,i||(i=!0,u("open",{name:s.name,position:e}))},C=e=>{a.offset=0,i&&(i=!1,u("close",{name:s.name,position:e}))},V=e=>{const o=Math.abs(a.offset),n=.15,U=i?1-n:n,y=e==="left"?m.value:p.value;y&&o>y*U?R(e):C(e)},G=e=>{s.disabled||(h=a.offset,f.start(e))},O=e=>{if(s.disabled)return;const{deltaX:o}=f;f.move(e),f.isHorizontal()&&(c=!0,a.dragging=!0,(!i||o.value*h<0)&&L(e,s.stopPropagation),a.offset=I(o.value+h,-p.value,m.value))},w=()=>{a.dragging&&(a.dragging=!1,V(a.offset>0?"left":"right"),setTimeout(()=>{c=!1},0))},P=(e="outside")=>{u("click",e),i&&!c&&X(s.beforeClose,{args:[{name:s.name,position:e}],done:()=>C(e)})},J=(e,o)=>n=>{o&&n.stopPropagation(),P(e)},b=(e,o)=>{const n=d[e];if(n)return t("div",{ref:o,class:E(e),onClick:J(e,!0)},[n()])};return q({open:R,close:C}),z(g,()=>P("outside"),{eventName:"touchstart"}),H("touchmove",O,{target:g}),()=>{var e;const o={transform:`translate3d(${a.offset}px, 0, 0)`,transitionDuration:a.dragging?"0s":".6s"};return t("div",{ref:g,class:E(),onClick:J("cell",c),onTouchstartPassive:G,onTouchend:w,onTouchcancel:w},[t("div",{class:E("wrapper"),style:o},[b("left",v),(e=d.default)==null?void 0:e.call(d),b("right",T)])])}}});const oe=K(ae);var ne="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAAAAXNSR0IArs4c6QAAA15JREFUWEft2E+ME2UYx/HvMxJhu0ZMWJAbwUTihRgucjDKn13+XEhQsp0uRuPJRDkAwSgK275Tl4UTSmIkcPK2O2nCv10SE9iEg9EDF8GDR5EEhXQPBg7ALjuPmXa2NLXzr50mHJhT23n7vp/+5nneaSs8Y4f0yqPGfh/kS9A3gX+BCzz2RuV4pRq1Zk9A6hQMqqU2C9/iibdVxip/hqEyB6nJl0FGGwsq1xHWAgPBa3/xxNsShsoUpE6+jDYwHsJnUnLPqBkZQLyrKP7l849QVGYgNYVvQI8GC3pYfCpF9+xiUjr+3grmX5yJQ2UCUmOPAUfCMJEo9d4Vp3J7cUzXoKSYCNQvYty3MwGpyR8D+ToumdaOql++pb+i+nr9nLdBTOU3/1HHCXWKaSRVtg/jcTx4vkeMe65jkJrCOOhXaZNpYMzHy+DhNWBj7TWLt6ToXu8IpE5hHO0Cc3C4j+VyEWRbDSPcoOhuEEFTg9TYfsSHO07Gx7zywkVUFzFV5tkkY+4fqYs6E8xy6xIwFCRTRa0hMRM3m4s+UVGryZ+o3yjrLdG66bV20f+66uRwH/ebMDAL1mArJtElU6cwimq5S8wUMBjMEYqJBakzsg31fqr1QafJPLCm0GSYSJCazUvg1d+BN4JPdkiMezLu8jxt7V056JsC2ZokmdiiVpPfDXK+PlCuiJncng7TPwWaChOTkD0BFGoI9d4Rp/JzEpCaXTk0N42wJU0yCRKybwFrEO5JyV2dGCO5abQzTGhC9fpZNQfibwszYtz63hFx1JIhdxnY3EjGYkiK7o249zafb7sPqRleDdY/Qf1MiJncG4n5/MN+Xpqb7hYTnlB5eD2eVd9BhVNScg+EgdR88DIsXALd1E0ykTWkTmEQ1asB6KiU3GPtQMG4H4B1WWAiasj2u8vvMj+hL5hnmiW6EmElC7IKS14D3QGsb4LexWJn2ppp/aDta8jJ70Pl+xTFOAPykZjJv1O8p+3Q9qCivR+L72ImnwO9gqenpVzxuyuTI6TLRgbAOwWsoHZnpopKFQv/Z/AsunAH+m+K+fFRJoqmSRJ9/ch60aj5noPi0n72Egq+K/s78bI4fY/PPwL5VtTYfucs/lXS4zVjp58VdQo26n0CsjR2eE8H6GPEOvsf2eN7gbiHuWgAAAAASUVORK5CYII=",de=Y({name:"shop-address",setup(){const s=({position:u})=>{if(u==="right")_({title:"\u786E\u5B9A\u5220\u9664\u5417\uFF1F"}).then(()=>!0);else return!0};return()=>t("div",{class:l.shopAddress},[[1,2,3,4,5].map(u=>t(oe,{class:l.swipeCell,beforeClose:s},{default:()=>t($,{center:!0},{title:()=>t("div",{class:l.title},[t("span",{class:l.name},[r("\u5C0F\u6797\u6797")]),t("span",{class:l.phone},[r("15353535353")]),t(ee,{round:!0,color:"#FF8057"},{default:()=>[r("\u9ED8\u8BA4")]})]),label:()=>t("div",{class:l.content},[r("\u6E56\u5317\u7701\u6B66\u6C49\u5E02\u6B66\u660C\u533A\u6C34\u679C\u6E56\u8857\u8857\u9053\u695A\u6CB3\u6C49\u8857\u603B\u90E8\u56FD\u9645A\u5EA73801")]),"right-icon":()=>t(Z,{name:ne,size:"18"},null)}),right:()=>t(W,{type:"danger"},{default:()=>[r("\u5220\u9664")]})})),t(x,{position:"bottom"},{default:()=>[t("div",{class:"btnGroup"},[t(W,{type:"primary",round:!0,block:!0},{default:()=>[r("\u65B0\u5EFA\u6536\u8D27\u5730\u5740")]})])]})])}});export{de as default};
