import{r as S,d as W,A as m,a9 as ve,D as G,l as ce,a8 as ie,M as ee,s as $,aa as fe,E as be,k as me,z as H,o as k,c as N,b as f,h as K,H as V,R as Q,a as D,g as F,I as te,G as T,t as ge,u as w,e as z,f as ae,w as Y,N as he,T as xe}from"../../common/index.DXvi0yH9.js";import{c as U}from"../../common/createLucideIcon.D3XWtEmL.js";import{_ as de}from"../../common/_plugin-vue_export-helper.DlAUqK2U.js";import{d as ye,e as _e}from"../../common/form.C3ove4if.js";import{o as O,b as M,w as ke,h as Se,f as Oe,E as Ce,u as Le,A as X,T as De,O as Te,a as le,N as oe,c as y}from"../../common/keyboard.D4P2wQc7.js";import{w as Pe,t as Re,i as J,l as Be}from"../../common/open-closed.CQX5sZkx.js";import{s as Ie}from"../../common/use-resolve-button-type.Cleihsk7.js";function Pt(){import.meta.url,import("_").catch(()=>1),async function*(){}().next()}/**
 * @license lucide-vue-next v0.544.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const $e=U("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
 * @license lucide-vue-next v0.544.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Ae=U("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
 * @license lucide-vue-next v0.544.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const ne=U("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/**
 * @license lucide-vue-next v0.544.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Ne=U("key",[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]]);/**
 * @license lucide-vue-next v0.544.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Fe=U("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
 * @license lucide-vue-next v0.544.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Ve=U("save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);/**
 * @license lucide-vue-next v0.544.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Me=U("trash",[["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]);function re(e){return[e.screenX,e.screenY]}function je(){let e=S([-1,-1]);return{wasMoved(r){let a=re(r);return e.value[0]===a[0]&&e.value[1]===a[1]?!1:(e.value=a,!0)},update(r){e.value=re(r)}}}function Ee(e){throw new Error("Unexpected object: "+e)}var C=(e=>(e[e.First=0]="First",e[e.Previous=1]="Previous",e[e.Next=2]="Next",e[e.Last=3]="Last",e[e.Specific=4]="Specific",e[e.Nothing=5]="Nothing",e))(C||{});function qe(e,r){let a=r.resolveItems();if(a.length<=0)return null;let v=r.resolveActiveIndex(),n=v!=null?v:-1;switch(e.focus){case 0:{for(let l=0;l<a.length;++l)if(!r.resolveDisabled(a[l],l,a))return l;return v}case 1:{n===-1&&(n=a.length);for(let l=n-1;l>=0;--l)if(!r.resolveDisabled(a[l],l,a))return l;return v}case 2:{for(let l=n+1;l<a.length;++l)if(!r.resolveDisabled(a[l],l,a))return l;return v}case 3:{for(let l=a.length-1;l>=0;--l)if(!r.resolveDisabled(a[l],l,a))return l;return v}case 4:{for(let l=0;l<a.length;++l)if(r.resolveId(a[l],l,a)===e.id)return l;return v}case 5:return null;default:Ee(e)}}let ue=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function we(e){var r,a;let v=(r=e.innerText)!=null?r:"",n=e.cloneNode(!0);if(!(n instanceof HTMLElement))return v;let l=!1;for(let h of n.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))h.remove(),l=!0;let t=l?(a=n.innerText)!=null?a:"":v;return ue.test(t)&&(t=t.replace(ue,"")),t}function ze(e){let r=e.getAttribute("aria-label");if(typeof r=="string")return r.trim();let a=e.getAttribute("aria-labelledby");if(a){let v=a.split(" ").map(n=>{let l=document.getElementById(n);if(l){let t=l.getAttribute("aria-label");return typeof t=="string"?t.trim():we(l).trim()}return null}).filter(Boolean);if(v.length>0)return v.join(", ")}return we(e).trim()}function He(e){let r=S(""),a=S("");return()=>{let v=O(e);if(!v)return"";let n=v.innerText;if(r.value===n)return a.value;let l=ze(v).trim().toLowerCase();return r.value=n,a.value=l,l}}function Ue(e,r){return e===r}var Ke=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Ke||{}),We=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(We||{}),Ye=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))(Ye||{});function Qe(e){requestAnimationFrame(()=>requestAnimationFrame(e))}let pe=Symbol("ListboxContext");function Z(e){let r=me(pe,null);if(r===null){let a=new Error("<".concat(e," /> is missing a parent <Listbox /> component."));throw Error.captureStackTrace&&Error.captureStackTrace(a,Z),a}return r}let Ge=W({name:"Listbox",emits:{"update:modelValue":e=>!0},props:{as:{type:[Object,String],default:"template"},disabled:{type:[Boolean],default:!1},by:{type:[String,Function],default:()=>Ue},horizontal:{type:[Boolean],default:!1},modelValue:{type:[Object,String,Number,Boolean],default:void 0},defaultValue:{type:[Object,String,Number,Boolean],default:void 0},form:{type:String,optional:!0},name:{type:String,optional:!0},multiple:{type:[Boolean],default:!1}},inheritAttrs:!1,setup(e,{slots:r,attrs:a,emit:v}){let n=S(1),l=S(null),t=S(null),h=S(null),c=S([]),g=S(""),d=S(null),s=S(1);function u(i=o=>o){let o=d.value!==null?c.value[d.value]:null,p=Te(i(c.value.slice()),_=>O(_.dataRef.domRef)),b=o?p.indexOf(o):null;return b===-1&&(b=null),{options:p,activeOptionIndex:b}}let R=m(()=>e.multiple?1:0),[B,L]=ye(m(()=>e.modelValue),i=>v("update:modelValue",i),m(()=>e.defaultValue)),P=m(()=>B.value===void 0?M(R.value,{1:[],0:void 0}):B.value),I={listboxState:n,value:P,mode:R,compare(i,o){if(typeof e.by=="string"){let p=e.by;return(i==null?void 0:i[p])===(o==null?void 0:o[p])}return e.by(i,o)},orientation:m(()=>e.horizontal?"horizontal":"vertical"),labelRef:l,buttonRef:t,optionsRef:h,disabled:m(()=>e.disabled),options:c,searchQuery:g,activeOptionIndex:d,activationTrigger:s,closeListbox(){e.disabled||n.value!==1&&(n.value=1,d.value=null)},openListbox(){e.disabled||n.value!==0&&(n.value=0)},goToOption(i,o,p){if(e.disabled||n.value===1)return;let b=u(),_=qe(i===C.Specific?{focus:C.Specific,id:o}:{focus:i},{resolveItems:()=>b.options,resolveActiveIndex:()=>b.activeOptionIndex,resolveId:x=>x.id,resolveDisabled:x=>x.dataRef.disabled});g.value="",d.value=_,s.value=p!=null?p:1,c.value=b.options},search(i){if(e.disabled||n.value===1)return;let o=g.value!==""?0:1;g.value+=i.toLowerCase();let p=(d.value!==null?c.value.slice(d.value+o).concat(c.value.slice(0,d.value+o)):c.value).find(_=>_.dataRef.textValue.startsWith(g.value)&&!_.dataRef.disabled),b=p?c.value.indexOf(p):-1;b===-1||b===d.value||(d.value=b,s.value=1)},clearSearch(){e.disabled||n.value!==1&&g.value!==""&&(g.value="")},registerOption(i,o){let p=u(b=>[...b,{id:i,dataRef:o}]);c.value=p.options,d.value=p.activeOptionIndex},unregisterOption(i){let o=u(p=>{let b=p.findIndex(_=>_.id===i);return b!==-1&&p.splice(b,1),p});c.value=o.options,d.value=o.activeOptionIndex,s.value=1},theirOnChange(i){e.disabled||L(i)},select(i){e.disabled||L(M(R.value,{0:()=>i,1:()=>{let o=$(I.value.value).slice(),p=$(i),b=o.findIndex(_=>I.compare(p,$(_)));return b===-1?o.push(p):o.splice(b,1),o}}))}};Pe([t,h],(i,o)=>{var p;I.closeListbox(),ke(o,Se.Loose)||(i.preventDefault(),(p=O(t))==null||p.focus())},m(()=>n.value===0)),ve(pe,I),Re(m(()=>M(n.value,{0:J.Open,1:J.Closed})));let A=m(()=>{var i;return(i=O(t))==null?void 0:i.closest("form")});return G(()=>{ce([A],()=>{if(!A.value||e.defaultValue===void 0)return;function i(){I.theirOnChange(e.defaultValue)}return A.value.addEventListener("reset",i),()=>{var o;(o=A.value)==null||o.removeEventListener("reset",i)}},{immediate:!0})}),()=>{let{name:i,modelValue:o,disabled:p,form:b,..._}=e,x={open:n.value===0,disabled:p,value:P.value};return ie(ee,[...i!=null&&P.value!=null?_e({[i]:P.value}).map(([j,E])=>ie(Oe,Ce({features:Le.Hidden,key:j,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:b,disabled:p,name:j,value:E}))):[],X({ourProps:{},theirProps:{...a,...De(_,["defaultValue","onUpdate:modelValue","horizontal","multiple","by"])},slot:x,slots:r,attrs:a,name:"Listbox"})])}}}),Je=W({name:"ListboxButton",props:{as:{type:[Object,String],default:"button"},id:{type:String,default:null}},setup(e,{attrs:r,slots:a,expose:v}){var n;let l=(n=e.id)!=null?n:"headlessui-listbox-button-".concat(le()),t=Z("ListboxButton");v({el:t.buttonRef,$el:t.buttonRef});function h(s){switch(s.key){case y.Space:case y.Enter:case y.ArrowDown:s.preventDefault(),t.openListbox(),H(()=>{var u;(u=O(t.optionsRef))==null||u.focus({preventScroll:!0}),t.value.value||t.goToOption(C.First)});break;case y.ArrowUp:s.preventDefault(),t.openListbox(),H(()=>{var u;(u=O(t.optionsRef))==null||u.focus({preventScroll:!0}),t.value.value||t.goToOption(C.Last)});break}}function c(s){switch(s.key){case y.Space:s.preventDefault();break}}function g(s){t.disabled.value||(t.listboxState.value===0?(t.closeListbox(),H(()=>{var u;return(u=O(t.buttonRef))==null?void 0:u.focus({preventScroll:!0})})):(s.preventDefault(),t.openListbox(),Qe(()=>{var u;return(u=O(t.optionsRef))==null?void 0:u.focus({preventScroll:!0})})))}let d=Ie(m(()=>({as:e.as,type:r.type})),t.buttonRef);return()=>{var s,u;let R={open:t.listboxState.value===0,disabled:t.disabled.value,value:t.value.value},{...B}=e,L={ref:t.buttonRef,id:l,type:d.value,"aria-haspopup":"listbox","aria-controls":(s=O(t.optionsRef))==null?void 0:s.id,"aria-expanded":t.listboxState.value===0,"aria-labelledby":t.labelRef.value?[(u=O(t.labelRef))==null?void 0:u.id,l].join(" "):void 0,disabled:t.disabled.value===!0?!0:void 0,onKeydown:h,onKeyup:c,onClick:g};return X({ourProps:L,theirProps:B,slot:R,attrs:r,slots:a,name:"ListboxButton"})}}}),Xe=W({name:"ListboxOptions",props:{as:{type:[Object,String],default:"ul"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},id:{type:String,default:null}},setup(e,{attrs:r,slots:a,expose:v}){var n;let l=(n=e.id)!=null?n:"headlessui-listbox-options-".concat(le()),t=Z("ListboxOptions"),h=S(null);v({el:t.optionsRef,$el:t.optionsRef});function c(s){switch(h.value&&clearTimeout(h.value),s.key){case y.Space:if(t.searchQuery.value!=="")return s.preventDefault(),s.stopPropagation(),t.search(s.key);case y.Enter:if(s.preventDefault(),s.stopPropagation(),t.activeOptionIndex.value!==null){let u=t.options.value[t.activeOptionIndex.value];t.select(u.dataRef.value)}t.mode.value===0&&(t.closeListbox(),H(()=>{var u;return(u=O(t.buttonRef))==null?void 0:u.focus({preventScroll:!0})}));break;case M(t.orientation.value,{vertical:y.ArrowDown,horizontal:y.ArrowRight}):return s.preventDefault(),s.stopPropagation(),t.goToOption(C.Next);case M(t.orientation.value,{vertical:y.ArrowUp,horizontal:y.ArrowLeft}):return s.preventDefault(),s.stopPropagation(),t.goToOption(C.Previous);case y.Home:case y.PageUp:return s.preventDefault(),s.stopPropagation(),t.goToOption(C.First);case y.End:case y.PageDown:return s.preventDefault(),s.stopPropagation(),t.goToOption(C.Last);case y.Escape:s.preventDefault(),s.stopPropagation(),t.closeListbox(),H(()=>{var u;return(u=O(t.buttonRef))==null?void 0:u.focus({preventScroll:!0})});break;case y.Tab:s.preventDefault(),s.stopPropagation();break;default:s.key.length===1&&(t.search(s.key),h.value=setTimeout(()=>t.clearSearch(),350));break}}let g=Be(),d=m(()=>g!==null?(g.value&J.Open)===J.Open:t.listboxState.value===0);return()=>{var s,u;let R={open:t.listboxState.value===0},{...B}=e,L={"aria-activedescendant":t.activeOptionIndex.value===null||(s=t.options.value[t.activeOptionIndex.value])==null?void 0:s.id,"aria-multiselectable":t.mode.value===1?!0:void 0,"aria-labelledby":(u=O(t.buttonRef))==null?void 0:u.id,"aria-orientation":t.orientation.value,id:l,onKeydown:c,role:"listbox",tabIndex:0,ref:t.optionsRef};return X({ourProps:L,theirProps:B,slot:R,attrs:r,slots:a,features:oe.RenderStrategy|oe.Static,visible:d.value,name:"ListboxOptions"})}}}),Ze=W({name:"ListboxOption",props:{as:{type:[Object,String],default:"li"},value:{type:[Object,String,Number,Boolean]},disabled:{type:Boolean,default:!1},id:{type:String,default:null}},setup(e,{slots:r,attrs:a,expose:v}){var n;let l=(n=e.id)!=null?n:"headlessui-listbox-option-".concat(le()),t=Z("ListboxOption"),h=S(null);v({el:h,$el:h});let c=m(()=>t.activeOptionIndex.value!==null?t.options.value[t.activeOptionIndex.value].id===l:!1),g=m(()=>M(t.mode.value,{0:()=>t.compare($(t.value.value),$(e.value)),1:()=>$(t.value.value).some(i=>t.compare($(i),$(e.value)))})),d=m(()=>M(t.mode.value,{1:()=>{var i;let o=$(t.value.value);return((i=t.options.value.find(p=>o.some(b=>t.compare($(b),$(p.dataRef.value)))))==null?void 0:i.id)===l},0:()=>g.value})),s=He(h),u=m(()=>({disabled:e.disabled,value:e.value,get textValue(){return s()},domRef:h}));G(()=>t.registerOption(l,u)),fe(()=>t.unregisterOption(l)),G(()=>{ce([t.listboxState,g],()=>{t.listboxState.value===0&&g.value&&M(t.mode.value,{1:()=>{d.value&&t.goToOption(C.Specific,l)},0:()=>{t.goToOption(C.Specific,l)}})},{immediate:!0})}),be(()=>{t.listboxState.value===0&&c.value&&t.activationTrigger.value!==0&&H(()=>{var i,o;return(o=(i=O(h))==null?void 0:i.scrollIntoView)==null?void 0:o.call(i,{block:"nearest"})})});function R(i){if(e.disabled)return i.preventDefault();t.select(e.value),t.mode.value===0&&(t.closeListbox(),H(()=>{var o;return(o=O(t.buttonRef))==null?void 0:o.focus({preventScroll:!0})}))}function B(){if(e.disabled)return t.goToOption(C.Nothing);t.goToOption(C.Specific,l)}let L=je();function P(i){L.update(i)}function I(i){L.wasMoved(i)&&(e.disabled||c.value||t.goToOption(C.Specific,l,0))}function A(i){L.wasMoved(i)&&(e.disabled||c.value&&t.goToOption(C.Nothing))}return()=>{let{disabled:i}=e,o={active:c.value,selected:g.value,disabled:i},{value:p,disabled:b,..._}=e,x={id:l,ref:h,role:"option",tabIndex:i===!0?void 0:-1,"aria-disabled":i===!0?!0:void 0,"aria-selected":g.value,disabled:void 0,onClick:R,onFocus:B,onPointerenter:P,onMouseenter:P,onPointermove:I,onMousemove:I,onPointerleave:A,onMouseleave:A};return X({ourProps:x,theirProps:_,slot:o,attrs:a,slots:r,name:"ListboxOption"})}}});const et={key:0,class:"stwpro-license-notice-wrapper"},tt={class:"stwlite-tw-flex stwlite-tw-items-start"},lt={class:"stwlite-tw-flex-1"},st={class:"stwlite-tw-flex stwlite-tw-items-center stwlite-tw-gap-3"},it=["href"],at=W({__name:"LicenseNotice",setup(e){const r=m(()=>{var d,s;return(s=(d=te)==null?void 0:d.isProInstalled)!=null?s:!1}),a=m(()=>{var d,s;return(s=(d=te)==null?void 0:d.stwproStatus)!=null?s:{success:!1,check_type:"",license_page_url:""}}),v=m(()=>a.value.success),n=m(()=>a.value.check_type||"license_data"),l=m(()=>a.value.license_page_url),t=S(!1);G(()=>{const d=JSON.parse(localStorage.getItem("stwpro_dismissed_license_notices")||"{}"),s="license_".concat(n.value);t.value=d[s]===!0});const h=m(()=>!v.value),c=m(()=>{const d={icon:ne,bgColor:"stwlite-brand-bg-pink-light",borderColor:"stwlite-brand-border-pink",iconColor:"stwlite-brand-text-pink",titleColor:"stwlite-brand-text-dark",textColor:"stwlite-brand-text-gray",buttonColor:"stwlite-brand-bg-pink hover:stwlite-brand-bg-pink-dark",title:T("license_not_active_title",wp.i18n.__("License Not Active","saveto-wishlist-lite-for-woocommerce")),message:T("license_not_active_message",wp.i18n.__("Your license is not currently active. Please validate your license key to access all premium features.","saveto-wishlist-lite-for-woocommerce")),buttonText:T("activate_license",wp.i18n.__("Activate License","saveto-wishlist-lite-for-woocommerce"))},s={license_data:{icon:Ne,bgColor:"stwlite-brand-bg-pro-gold-light",borderColor:"stwlite-brand-border-pro-gold",iconColor:"stwlite-brand-text-pro-gold-dark",titleColor:"stwlite-brand-text-dark",textColor:"stwlite-brand-text-gray",buttonColor:"stwlite-brand-bg-pro-gold hover:stwlite-brand-bg-pro-gold-dark",title:T("license_not_provided_title",wp.i18n.__("License Not Provided","saveto-wishlist-lite-for-woocommerce")),message:T("license_not_provided_message",wp.i18n.__("Please enter and activate your SaveTo Wishlist Pro license key to access all premium features and receive updates.","saveto-wishlist-lite-for-woocommerce")),buttonText:T("activate_license",wp.i18n.__("Activate License","saveto-wishlist-lite-for-woocommerce"))},license_activated:d,license_status:d,license_expiration:{icon:ne,bgColor:"stwlite-brand-bg-pink-light",borderColor:"stwlite-brand-border-pink",iconColor:"stwlite-brand-text-pink",titleColor:"stwlite-brand-text-dark",textColor:"stwlite-brand-text-gray",buttonColor:"stwlite-brand-bg-pink hover:stwlite-brand-bg-pink-dark",title:T("license_expired_title",wp.i18n.__("License Expired","saveto-wishlist-lite-for-woocommerce")),message:T("license_expired_message",wp.i18n.__("Your license has expired. Please renew your license to continue receiving updates and support.","saveto-wishlist-lite-for-woocommerce")),buttonText:T("renew_license",wp.i18n.__("Renew License","saveto-wishlist-lite-for-woocommerce"))}};return s[n.value]||s.license_data}),g=m(()=>c.value.icon);return(d,s)=>h.value&&r.value?(k(),N("div",et,[f("div",{class:V(["stwlite-tw-border-l-4 stwlite-tw-p-6 stwlite-tw-rounded-lg stwlite-tw-shadow-sm stwlite-tw-relative",c.value.bgColor,c.value.borderColor])},[f("div",tt,[(k(),K(Q(g.value),{class:V(["stwlite-tw-w-6 stwlite-tw-h-6 stwlite-tw-mr-3 stwlite-tw-mt-0.5 stwlite-tw-flex-shrink-0",c.value.iconColor])},null,8,["class"])),f("div",lt,[f("h3",{class:V(["stwlite-tw-text-lg stwlite-tw-font-semibold stwlite-tw-mb-2 stwlite-tw-mt-0",c.value.titleColor])},D(c.value.title),3),f("p",{class:V(["stwlite-tw-mb-4",c.value.textColor])},D(c.value.message),3),f("div",st,[f("a",{href:l.value,class:V(["stwlite-tw-inline-flex stwlite-tw-items-center stwlite-tw-px-4 stwlite-tw-py-2 stwlite-tw-text-white stwlite-tw-font-medium stwlite-tw-rounded-lg stwlite-tw-transition-colors stwlite-tw-no-underline hover:stwlite-tw-text-white",c.value.buttonColor])},D(c.value.buttonText),11,it)])])])],2)])):F("",!0)}}),ot=de(at,[["__scopeId","data-v-bbabce97"]]),nt={class:"global-header stwlite-tw-bg-white stwlite-tw-border-0 stwlite-tw-border-b stwlite-tw-border-gray-200 stwlite-tw-border-solid"},rt={class:"stwlite-tw-px-4 sm:stwlite-tw-px-6 lg:stwlite-tw-px-8"},ut={class:"stwlite-tw-flex stwlite-tw-justify-between stwlite-tw-items-center stwlite-tw-py-4"},wt={class:"stwlite-tw-flex stwlite-tw-items-center stwlite-tw-space-x-4"},ct=["src","alt"],dt={class:"stwlite-tw-flex stwlite-tw-items-center stwlite-tw-space-x-4"},pt={class:"stwlite-tw-text-2xl stwlite-tw-font-semibold stwlite-brand-text-dark stwlite-tw-my-0 stwlite-tw-py-0"},vt={key:0,class:"stwlite-tw-text-sm stwlite-brand-text-gray stwlite-tw-mt-1 stwlite-tw-mb-0"},ft={class:"stwlite-tw-flex stwlite-tw-items-center stwlite-tw-justify-end stwlite-tw-space-x-4"},bt=["disabled"],mt={key:1},gt={key:2},ht={class:"stwlite-tw-relative stwlite-tw-w-96"},xt={class:"stwlite-tw-flex stwlite-tw-items-center"},yt={class:"stwlite-tw-flex stwlite-tw-flex-col"},_t={class:"stwlite-tw-block stwlite-tw-truncate stwlite-tw-text-lg stwlite-tw-font-medium stwlite-tw-text-gray-900"},kt={class:"stwlite-tw-text-sm stwlite-tw-text-gray-500 stwlite-tw-mt-0.5"},St={class:"stwlite-tw-py-1 stwlite-tw-max-h-64 stwlite-tw-overflow-y-auto"},Ot={class:"stwlite-tw-flex stwlite-tw-flex-col"},Ct={class:"stwlite-tw-flex stwlite-tw-items-center"},Lt={class:"stwlite-tw-flex stwlite-tw-flex-col"},Dt={class:"stwlite-tw-text-xs stwlite-tw-text-gray-500 stwlite-tw-mt-0.5"},Tt=W({__name:"Header",props:{infoData:{type:Object,required:!0},showButton:{type:Boolean,required:!1,default:!1},buttonIcon:{type:String,required:!1,default:""},buttonText:{type:String,required:!1,default:T("submitText",wp.i18n.__("Save Changes","saveto-wishlist-lite-for-woocommerce"))},buttonLoadingText:{type:String,required:!1,default:T("saving",wp.i18n.__("Saving...","saveto-wishlist-lite-for-woocommerce"))},showBackButton:{type:Boolean,required:!1,default:!1},showDeleteButton:{type:Boolean,required:!1,default:!1},isLoading:{type:Boolean,required:!1,default:!1},selectedOption:{type:String,required:!1,default:null},showSelect:{type:Boolean,required:!1,default:!1},selectOptions:{type:Array,required:!1,default:[]}},emits:["trigger-button","trigger-back","trigger-delete","select-change"],setup(e,{emit:r}){const a=e,{infoData:v,showButton:n,buttonText:l,buttonLoadingText:t,showBackButton:h,showDeleteButton:c,isLoading:g,showSelect:d,selectOptions:s,selectedOption:u}=ge(a),R=m(()=>v.value.title),B=m(()=>v.value.description||""),L=te.details,P=r,I=S(!1),A=()=>{P("trigger-button")},i=()=>{P("trigger-back")},o=()=>{P("trigger-delete")},p=b=>{P("select-change",b||""),I.value=!1};return(b,_)=>(k(),N(ee,null,[f("div",nt,[f("div",rt,[f("div",ut,[f("div",wt,[f("img",{src:w(L).logo,alt:w(L).logo_alt,class:"stwlite-tw-max-w-12"},null,8,ct),f("div",dt,[w(h)?(k(),N("button",{key:0,onClick:i,class:"stwlite-tw-inline-flex stwlite-tw-border-0 stwlite-tw-items-center stwlite-tw-text-gray-600 hover:stwlite-tw-text-gray-900 stwlite-tw-transition-colors stwlite-tw-duration-200 stwlite-tw-text-base stwlite-tw-bg-transparent stwlite-tw-cursor-pointer"},[z(w($e),{class:"stwlite-tw-w-5 stwlite-tw-h-5 stwlite-tw-mr-2"}),ae(" "+D(w(T)("back",w(wp.i18n.__)("Back","saveto-wishlist-lite-for-woocommerce"))),1)])):F("",!0),f("div",null,[f("h1",pt,D(R.value),1),B.value?(k(),N("p",vt,D(B.value),1)):F("",!0)])])]),f("div",ft,[w(n)?(k(),N("button",{key:0,type:"button",class:V(["stwlite-tw-inline-flex stwlite-tw-items-center stwlite-tw-bg-blue-600 stwlite-tw-text-white stwlite-tw-px-4 stwlite-tw-py-2 stwlite-tw-rounded-md stwlite-tw-font-medium stwlite-tw-text-sm hover:stwlite-tw-bg-blue-700 stwlite-tw-transition-colors stwlite-tw-border-0 stwlite-tw-cursor-pointer",w(g)?"stwlite-tw-bg-gray-400 stwlite-tw-cursor-not-allowed hover:stwlite-tw-bg-gray-400":"stwlite-tw-bg-blue-600 hover:stwlite-tw-bg-blue-700"]),onClick:A,disabled:w(g)},[e.buttonIcon?(k(),K(Q(e.buttonIcon==="save"?w(Ve):w(Fe)),{key:0,class:"stwlite-tw-w-4 stwlite-tw-h-4 stwlite-tw-mr-2"})):F("",!0),w(g)?(k(),N("span",mt,D(w(t)),1)):(k(),N("span",gt,D(w(l)),1))],10,bt)):F("",!0),w(d)?(k(),K(w(Ge),{key:1,"model-value":w(u),"onUpdate:modelValue":p},{default:Y(()=>[f("div",ht,[z(w(Je),{class:"stwlite-tw-relative stwlite-tw-w-full stwlite-tw-bg-white stwlite-tw-border stwlite-tw-border-gray-300 stwlite-tw-rounded-lg stwlite-tw-px-5 stwlite-tw-py-3 stwlite-tw-text-left stwlite-tw-shadow-sm hover:stwlite-tw-border-gray-400 stwlite-tw-transition-colors focus:stwlite-tw-outline-none focus-visible:stwlite-tw-ring-2 focus-visible:stwlite-tw-ring-offset-2 focus-visible:stwlite-tw-ring-blue-500 stwlite-tw-text-lg stwlite-tw-cursor-pointer"},{default:Y(()=>{var x,j,E,se;return[f("div",xt,[(x=w(s).find(q=>q.value===w(u)))!=null&&x.icon?(k(),K(Q((j=w(s).find(q=>q.value===w(u)))==null?void 0:j.icon),{key:0,class:"stwlite-tw-w-6 stwlite-tw-h-6 stwlite-tw-mr-3 stwlite-tw-text-blue-600"})):F("",!0),f("div",yt,[f("span",_t,D(((E=w(s).find(q=>q.value===w(u)))==null?void 0:E.label)||""),1),f("span",kt,D(((se=w(s).find(q=>q.value===w(u)))==null?void 0:se.description)||""),1)])]),z(w(Ae),{class:V(["stwlite-tw-absolute stwlite-tw-right-4 stwlite-tw-top-1/2 stwlite-tw--translate-y-1/2 stwlite-tw-w-6 stwlite-tw-h-6 stwlite-tw-transition-transform",I.value?"stwlite-tw-rotate-180":""])},null,8,["class"])]}),_:1}),z(xe,{"leave-active-class":"stwlite-tw-transition stwlite-tw-duration-100 stwlite-tw-ease-in","leave-from-class":"stwlite-tw-opacity-100","leave-to-class":"stwlite-tw-opacity-0"},{default:Y(()=>[z(w(Xe),{class:"stwlite-tw-absolute stwlite-tw-right-0 stwlite-tw-z-50 stwlite-tw-w-96 stwlite-tw-mt-2 stwlite-tw-bg-white stwlite-tw-border stwlite-tw-border-gray-200 stwlite-tw-rounded-lg stwlite-tw-shadow-lg stwlite-tw-ring-1 stwlite-tw-ring-black stwlite-tw-ring-opacity-5"},{default:Y(()=>[f("div",St,[(k(!0),N(ee,null,he(w(s),x=>(k(),K(w(Ze),{key:x.value,value:x.value,as:"template"},{default:Y(({active:j,selected:E})=>[f("li",{class:V(["stwlite-tw-px-4 stwlite-tw-py-3 stwlite-tw-cursor-pointer stwlite-tw-transition-colors",j?"stwlite-tw-bg-blue-50":"",E?"stwlite-tw-bg-blue-100 stwlite-tw-border-l-4 stwlite-tw-border-l-blue-600":"stwlite-tw-border-l-4 stwlite-tw-border-l-transparent"])},[f("div",Ot,[f("div",Ct,[x.icon?(k(),K(Q(x.icon),{key:0,class:"stwlite-tw-w-4 stwlite-tw-h-4 stwlite-tw-mr-2"})):F("",!0),f("div",Lt,[f("span",{class:V(["stwlite-tw-font-medium stwlite-tw-text-sm",E?"stwlite-tw-text-blue-900":"stwlite-tw-text-gray-900"])},D(x.label),3),f("span",Dt,D(x.description),1)])])])],2)]),_:2},1032,["value"]))),128))])]),_:1})]),_:1})])]),_:1},8,["model-value"])):F("",!0),w(c)?(k(),N("button",{key:2,onClick:o,class:"stwlite-tw-inline-flex stwlite-tw-items-center stwlite-tw-px-4 stwlite-tw-py-2 stwlite-tw-border stwlite-tw-border-transparent stwlite-tw-text-sm stwlite-tw-font-medium stwlite-tw-rounded-md stwlite-tw-text-white stwlite-tw-bg-red-600 hover:stwlite-tw-bg-red-700 focus:stwlite-tw-outline-none focus:stwlite-tw-ring-2 focus:stwlite-tw-ring-offset-2 focus:stwlite-tw-ring-red-500 stwlite-tw-transition-colors stwlite-tw-duration-200 stwlite-tw-cursor-pointer"},[z(w(Me),{class:"stwlite-tw-w-4 stwlite-tw-h-4 stwlite-tw-mr-2"}),ae(" "+D(w(T)("delete",w(wp.i18n.__)("Delete","saveto-wishlist-lite-for-woocommerce"))),1)])):F("",!0)])])])]),z(ot)],64))}}),Vt=de(Tt,[["__scopeId","data-v-60654ae8"]]);export{Vt as H,Fe as P,Me as T,Pt as __vite_legacy_guard,C as c,qe as f,je as u};
