import x from"./D8JKpnMU.js";import{x as V,A as _,R as b,Z as v}from"./BrXQVriU.js";import{f as w,g as p,b as y,o as u,w as d,a as g,n as B,d as e,c as m,F as h,j as M,t as f,q as S}from"./Cd1nqtmb.js";const Z={"data-test-id":"s-btn-ticket__root",class:"flex max-w-full items-center gap-1"},T={class:"truncate"},$={key:0,"data-test-id":"s-btn-ticket__buy-now-price-text",class:"font-normal"},H=w({__name:"SBtnTicket",props:{..._(),...V(),url:String,text:String,target:{type:String,default:"_blank"},tooltipText:String,tooltipEnabled:{type:Boolean,default:!0},_class:String,game:Object},setup(r){const a=r,L=p(()=>!!((C.value||a.tooltipText)&&a.tooltipEnabled)),C=p(()=>{var t;return!!(a!=null&&a.url&&((t=a.url)!=null&&t.includes("seatgeek")))}),s=p(()=>{var l,i,o,n,c;let t="";return a.text&&((l=a.text)!=null&&l.includes("$"))&&(a.text.includes("-")?t=((n=(o=(i=a.text)==null?void 0:i.split("-"))==null?void 0:o.at(0))==null?void 0:n.replace(/\D/g,""))??"":t=((c=a.text)==null?void 0:c.replace(/\D/g,""))??""),t?`$${t}+`:""}),k=p(()=>{var l,i,o,n,c;let t="Buy tickets";return(i=(l=a.game)==null?void 0:l.opponent)!=null&&i.title&&(t+=` for the ${(n=(o=a.game)==null?void 0:o.opponent)==null?void 0:n.title} game`),s.value&&(t+=`. Prices start at $${(c=s.value)==null?void 0:c.replace(/\D/g,"")}`),C.value&&(t+=" on SeatGeek"),t});return(t,l)=>(u(),y(x,{theme:t.theme,container:"body",disabled:!L.value},{text:d(()=>[S(f(C.value?"Tickets via our Official Ticket Marketplace":r.tooltipText),1)]),default:d(()=>[g(b,{tag:"a",href:r.url,size:t.size,theme:t.theme,class:B(["s-btn-ticket w-full max-w-full",r._class]),target:r.target,"aria-label":k.value,type:"priority"},{default:d(()=>[e("span",Z,[C.value?(u(),m(h,{key:0},[l[0]||(l[0]=e("span",{class:"truncate"},"Sold Out! Buy on",-1)),l[1]||(l[1]=e("span",{class:"s-btn-ticket__seatgeek-logo shrink-0"},[e("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e("g",{"clip-path":"url(#clip0_2_2123)"},[e("path",{d:"M9.66292 8.84911L9.99679 7.87961C10.5682 7.8764 11.1364 7.87319 11.7079 7.86677L12.0449 8.84269C12.5425 8.83948 13.0433 8.84911 13.5377 8.8459L11.5602 3.42696C11.3258 3.43659 10.3692 3.46227 10.1445 3.46548L8.65169 7.68057C8.03852 7.68057 7.4671 7.67736 6.8443 7.67094V6.58266L7.95827 6.5955V5.61316L6.8443 5.5971V4.55055C8.05779 4.57945 8.61637 4.57303 8.61637 4.57303L8.38844 3.4077C8.38844 3.4077 6.9374 3.38523 5.35474 3.31781V8.8459C5.66934 8.8459 7.23596 8.85232 8.23756 8.85553H8.89888C9.14928 8.84911 9.39647 8.84911 9.66292 8.84911ZM11.3708 6.88121C11.0273 6.88763 10.6806 6.89084 10.3371 6.89405L10.8571 5.38202L11.3708 6.88121Z",fill:"currentColor"}),e("path",{d:"M14.1445 8.84591C14.6388 8.8427 15.1364 8.84591 15.6308 8.8427L15.6372 4.37721C16.1766 4.33547 16.7191 4.28732 17.2584 4.23274L17.0273 3C15.6051 3.17014 14.1862 3.29213 12.7576 3.37239L12.5265 4.56661C13.0658 4.54414 13.6051 4.51525 14.1445 4.48315V8.84591Z",fill:"currentColor"}),e("path",{d:"M2.47192 4.62439C2.47192 3.95023 3.91012 4.13322 4.57144 4.52487L4.63243 3.19582C4.47513 3.14767 3.83949 3.0032 3.08508 3.0032C2.01285 3.0032 1.07866 3.63563 1.07866 4.64365C1.07866 6.4382 3.5281 6.5634 3.5281 7.2825C3.5281 8.22953 1.9037 7.70304 1.07866 6.92295V8.43499C1.07866 8.43499 1.6854 8.99999 2.89246 8.99999C4.22152 8.99999 4.89888 8.13322 4.89888 7.19903C4.89888 5.3756 2.47192 5.36918 2.47192 4.62439Z",fill:"currentColor"}),e("path",{d:"M18 15.7865L16.0385 12.4446L17.7753 9.76724H16.0995L14.5778 12.1525C14.5843 11.3595 14.5714 10.5634 14.5778 9.77045C14.077 9.77045 13.5923 9.76724 13.0915 9.76724V15.3371C13.0915 15.3371 14.0738 15.3981 14.5778 15.4366V12.8619L16.0449 15.5586C16.7769 15.6356 17.4446 15.7159 18 15.7865Z",fill:"currentColor"}),e("path",{d:"M6.84751 12.9679C7.21669 12.9615 7.95826 12.9551 7.95826 12.9551V11.9631C7.95826 11.9631 7.21669 11.9695 6.84751 11.9727V10.923C7.88764 10.923 8.61637 10.9294 8.61637 10.9294L8.38523 9.77689H5.35794V15.3082C6.05457 15.2632 7.97431 15.2183 8.626 15.2183C8.70305 14.8266 8.78009 14.4382 8.85714 14.0465C8.18619 14.0465 7.51845 14.053 6.84751 14.069C6.84751 13.6966 6.84751 13.3371 6.84751 12.9679Z",fill:"currentColor"}),e("path",{d:"M10.7191 12.9583C11.0626 12.9647 11.4093 12.9679 11.7528 12.9775V11.9855C11.4093 11.9791 11.0626 11.9759 10.7191 11.9727V10.9326L12.4976 10.9454L12.2697 9.78329H9.22954V15.2183C10.26 15.2183 11.3868 15.2504 12.4912 15.3082L12.7319 14.13C12.1477 14.1107 11.252 14.0786 10.7191 14.069C10.7191 13.6966 10.7191 13.3274 10.7191 12.9583Z",fill:"currentColor"}),e("path",{d:"M2.48154 13.0963L3.38684 13.0514V14.2038C2.02889 14.3258 1.4703 13.8764 1.4703 12.5313C1.4703 11.2857 2.47833 10.9743 3.40931 10.9743C4.22793 10.9743 4.66453 11.0642 4.66453 11.0642L4.41734 9.77046C4.20225 9.76083 3.81701 9.74799 3.16854 9.74799C1.66613 9.74799 0 10.4671 0 12.7432C0 14.6597 1.30979 15.6324 2.9695 15.4751C4.13804 15.366 4.66453 15.3403 4.66453 15.3403V12.0112L2.71268 12.0562L2.48154 13.0963Z",fill:"currentColor"})]),e("defs",null,[e("clipPath",{id:"clip0_2_2123"},[e("rect",{width:"18",height:"12.7865",fill:"white",transform:"translate(0 3)"})])])])],-1))],64)):(u(),m(h,{key:1},[e("span",T,f(`${s.value?"Buy From":"Buy Now"}`),1),g(v,{name:"icon-tickets",size:"x-small"}),s.value?(u(),m("span",,ドルf(s.value),1)):M("",!0)],64))])]),_:1},8,["href","size","theme","class","target","aria-label"])]),_:1},8,["theme","disabled"]))}});export{H as N};