flowrix 1.0.1-beta.147 → 1.0.1-beta.148

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (193) hide show
  1. package/dist/module.json +1 -1
  2. package/dist/module.mjs +5 -0
  3. package/dist/runtime/components/SampleProductCard.d.vue.ts +13 -0
  4. package/dist/runtime/components/SampleProductCard.vue +362 -0
  5. package/dist/runtime/components/SampleProductCard.vue.d.ts +13 -0
  6. package/dist/runtime/components/WishList/dropdown.d.vue.ts +9 -0
  7. package/dist/runtime/components/WishList/dropdown.vue +417 -0
  8. package/dist/runtime/components/WishList/dropdown.vue.d.ts +9 -0
  9. package/dist/runtime/components/WishList/modal.d.vue.ts +13 -0
  10. package/dist/runtime/components/WishList/modal.vue +229 -0
  11. package/dist/runtime/components/WishList/modal.vue.d.ts +13 -0
  12. package/dist/runtime/components/product/AddToCart.d.vue.ts +15 -0
  13. package/dist/runtime/components/product/AddToCart.vue +176 -0
  14. package/dist/runtime/components/product/AddToCart.vue.d.ts +15 -0
  15. package/dist/runtime/components/product/AddtoCartSample.d.vue.ts +6 -0
  16. package/dist/runtime/components/product/AddtoCartSample.vue +110 -0
  17. package/dist/runtime/components/product/AddtoCartSample.vue.d.ts +6 -0
  18. package/dist/runtime/components/product/Badges.d.vue.ts +13 -0
  19. package/dist/runtime/components/product/Badges.vue +84 -0
  20. package/dist/runtime/components/product/Badges.vue.d.ts +13 -0
  21. package/dist/runtime/components/product/Description.d.vue.ts +9 -0
  22. package/dist/runtime/components/product/Description.vue +96 -0
  23. package/dist/runtime/components/product/Description.vue.d.ts +9 -0
  24. package/dist/runtime/components/product/Dynamic.d.vue.ts +9 -0
  25. package/dist/runtime/components/product/Dynamic.vue +136 -0
  26. package/dist/runtime/components/product/Dynamic.vue.d.ts +9 -0
  27. package/dist/runtime/components/product/Gallery.d.vue.ts +11 -0
  28. package/dist/runtime/components/product/Gallery.vue +133 -0
  29. package/dist/runtime/components/product/Gallery.vue.d.ts +11 -0
  30. package/dist/runtime/components/product/PopUpCart.d.vue.ts +11 -0
  31. package/dist/runtime/components/product/PopUpCart.vue +155 -0
  32. package/dist/runtime/components/product/PopUpCart.vue.d.ts +11 -0
  33. package/dist/runtime/components/product/ProductInfo.d.vue.ts +7 -0
  34. package/dist/runtime/components/product/ProductInfo.vue +105 -0
  35. package/dist/runtime/components/product/ProductInfo.vue.d.ts +7 -0
  36. package/dist/runtime/components/product/RequiredPopUp.d.vue.ts +9 -0
  37. package/dist/runtime/components/product/RequiredPopUp.vue +57 -0
  38. package/dist/runtime/components/product/RequiredPopUp.vue.d.ts +9 -0
  39. package/dist/runtime/components/product/bundleProduct/Bundle.d.vue.ts +13 -0
  40. package/dist/runtime/components/product/bundleProduct/Bundle.vue +35 -0
  41. package/dist/runtime/components/product/bundleProduct/Bundle.vue.d.ts +13 -0
  42. package/dist/runtime/components/product/bundleProduct/index.d.vue.ts +8 -0
  43. package/dist/runtime/components/product/bundleProduct/index.vue +32 -0
  44. package/dist/runtime/components/product/bundleProduct/index.vue.d.ts +8 -0
  45. package/dist/runtime/components/product/customProduct/AddtoCartSample.d.vue.ts +6 -0
  46. package/dist/runtime/components/product/customProduct/AddtoCartSample.vue +101 -0
  47. package/dist/runtime/components/product/customProduct/AddtoCartSample.vue.d.ts +6 -0
  48. package/dist/runtime/components/product/customProduct/Attributes.d.vue.ts +9 -0
  49. package/dist/runtime/components/product/customProduct/Attributes.vue +12 -0
  50. package/dist/runtime/components/product/customProduct/Attributes.vue.d.ts +9 -0
  51. package/dist/runtime/components/product/customProduct/AttributesComponents/AttributeType/drop-down.d.vue.ts +13 -0
  52. package/dist/runtime/components/product/customProduct/AttributesComponents/AttributeType/drop-down.vue +11 -0
  53. package/dist/runtime/components/product/customProduct/AttributesComponents/AttributeType/drop-down.vue.d.ts +13 -0
  54. package/dist/runtime/components/product/customProduct/AttributesComponents/AttributeType/multi-collection.d.vue.ts +3 -0
  55. package/dist/runtime/components/product/customProduct/AttributesComponents/AttributeType/multi-collection.vue +253 -0
  56. package/dist/runtime/components/product/customProduct/AttributesComponents/AttributeType/multi-collection.vue.d.ts +3 -0
  57. package/dist/runtime/components/product/customProduct/AttributesComponents/AttributeType/multi-colors.d.vue.ts +3 -0
  58. package/dist/runtime/components/product/customProduct/AttributesComponents/AttributeType/multi-colors.vue +253 -0
  59. package/dist/runtime/components/product/customProduct/AttributesComponents/AttributeType/multi-colors.vue.d.ts +3 -0
  60. package/dist/runtime/components/product/customProduct/AttributesComponents/AttributeType/multi-values.d.vue.ts +3 -0
  61. package/dist/runtime/components/product/customProduct/AttributesComponents/AttributeType/multi-values.vue +214 -0
  62. package/dist/runtime/components/product/customProduct/AttributesComponents/AttributeType/multi-values.vue.d.ts +3 -0
  63. package/dist/runtime/components/product/customProduct/AttributesComponents/AttributeType/style.d.vue.ts +13 -0
  64. package/dist/runtime/components/product/customProduct/AttributesComponents/AttributeType/style.vue +9 -0
  65. package/dist/runtime/components/product/customProduct/AttributesComponents/AttributeType/style.vue.d.ts +13 -0
  66. package/dist/runtime/components/product/customProduct/AttributesComponents/AttributeType/swatch.d.vue.ts +13 -0
  67. package/dist/runtime/components/product/customProduct/AttributesComponents/AttributeType/swatch.vue +9 -0
  68. package/dist/runtime/components/product/customProduct/AttributesComponents/AttributeType/swatch.vue.d.ts +13 -0
  69. package/dist/runtime/components/product/customProduct/AttributesComponents/PopupContent/Popup.d.vue.ts +9 -0
  70. package/dist/runtime/components/product/customProduct/AttributesComponents/PopupContent/Popup.vue +133 -0
  71. package/dist/runtime/components/product/customProduct/AttributesComponents/PopupContent/Popup.vue.d.ts +9 -0
  72. package/dist/runtime/components/product/customProduct/AttributesComponents/SingleAttribute.d.vue.ts +11 -0
  73. package/dist/runtime/components/product/customProduct/AttributesComponents/SingleAttribute.vue +35 -0
  74. package/dist/runtime/components/product/customProduct/AttributesComponents/SingleAttribute.vue.d.ts +11 -0
  75. package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/SingleSlide.d.vue.ts +13 -0
  76. package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/SingleSlide.vue +134 -0
  77. package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/SingleSlide.vue.d.ts +13 -0
  78. package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/SingleSlidemagnifier.d.vue.ts +15 -0
  79. package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/SingleSlidemagnifier.vue +138 -0
  80. package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/SingleSlidemagnifier.vue.d.ts +15 -0
  81. package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/button.d.vue.ts +11 -0
  82. package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/button.vue +149 -0
  83. package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/button.vue.d.ts +11 -0
  84. package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/dropdown.d.vue.ts +11 -0
  85. package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/dropdown.vue +82 -0
  86. package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/dropdown.vue.d.ts +11 -0
  87. package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/dropdownWithIcon.d.vue.ts +11 -0
  88. package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/dropdownWithIcon.vue +108 -0
  89. package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/dropdownWithIcon.vue.d.ts +11 -0
  90. package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/height.d.vue.ts +11 -0
  91. package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/height.vue +104 -0
  92. package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/height.vue.d.ts +11 -0
  93. package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/imageBox.d.vue.ts +11 -0
  94. package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/imageBox.vue +87 -0
  95. package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/imageBox.vue.d.ts +11 -0
  96. package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/imageBoxWithMagnifier.d.vue.ts +11 -0
  97. package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/imageBoxWithMagnifier.vue +219 -0
  98. package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/imageBoxWithMagnifier.vue.d.ts +11 -0
  99. package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/message.d.vue.ts +11 -0
  100. package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/message.vue +36 -0
  101. package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/message.vue.d.ts +11 -0
  102. package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/number.d.vue.ts +11 -0
  103. package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/number.vue +45 -0
  104. package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/number.vue.d.ts +11 -0
  105. package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/orderSample/button.d.vue.ts +13 -0
  106. package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/orderSample/button.vue +48 -0
  107. package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/orderSample/button.vue.d.ts +13 -0
  108. package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/radio.d.vue.ts +11 -0
  109. package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/radio.vue +154 -0
  110. package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/radio.vue.d.ts +11 -0
  111. package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/slider.d.vue.ts +11 -0
  112. package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/slider.vue +111 -0
  113. package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/slider.vue.d.ts +11 -0
  114. package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/sliderWithMagnifier.d.vue.ts +11 -0
  115. package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/sliderWithMagnifier.vue +269 -0
  116. package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/sliderWithMagnifier.vue.d.ts +11 -0
  117. package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/subheight.d.vue.ts +11 -0
  118. package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/subheight.vue +63 -0
  119. package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/subheight.vue.d.ts +11 -0
  120. package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/subwidth.d.vue.ts +11 -0
  121. package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/subwidth.vue +63 -0
  122. package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/subwidth.vue.d.ts +11 -0
  123. package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/swatch.d.vue.ts +11 -0
  124. package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/swatch.vue +220 -0
  125. package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/swatch.vue.d.ts +11 -0
  126. package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/text.d.vue.ts +11 -0
  127. package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/text.vue +47 -0
  128. package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/text.vue.d.ts +11 -0
  129. package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/width.d.vue.ts +11 -0
  130. package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/width.vue +91 -0
  131. package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/width.vue.d.ts +11 -0
  132. package/dist/runtime/components/product/customProduct/ConfirmPopup.d.vue.ts +9 -0
  133. package/dist/runtime/components/product/customProduct/ConfirmPopup.vue +25 -0
  134. package/dist/runtime/components/product/customProduct/ConfirmPopup.vue.d.ts +9 -0
  135. package/dist/runtime/components/product/customProduct/RequiredPopUp.d.vue.ts +9 -0
  136. package/dist/runtime/components/product/customProduct/RequiredPopUp.vue +49 -0
  137. package/dist/runtime/components/product/customProduct/RequiredPopUp.vue.d.ts +9 -0
  138. package/dist/runtime/components/product/customProduct/Reviews.d.vue.ts +7 -0
  139. package/dist/runtime/components/product/customProduct/Reviews.vue +25 -0
  140. package/dist/runtime/components/product/customProduct/Reviews.vue.d.ts +7 -0
  141. package/dist/runtime/components/product/customProduct/SingleStep.d.vue.ts +11 -0
  142. package/dist/runtime/components/product/customProduct/SingleStep.vue +11 -0
  143. package/dist/runtime/components/product/customProduct/SingleStep.vue.d.ts +11 -0
  144. package/dist/runtime/components/product/customProduct/Steps.d.vue.ts +9 -0
  145. package/dist/runtime/components/product/customProduct/Steps.vue +221 -0
  146. package/dist/runtime/components/product/customProduct/Steps.vue.d.ts +9 -0
  147. package/dist/runtime/components/product/customProduct/index.d.vue.ts +9 -0
  148. package/dist/runtime/components/product/customProduct/index.vue +272 -0
  149. package/dist/runtime/components/product/customProduct/index.vue.d.ts +9 -0
  150. package/dist/runtime/components/product/index.d.vue.ts +8 -0
  151. package/dist/runtime/components/product/index.vue +90 -0
  152. package/dist/runtime/components/product/index.vue.d.ts +8 -0
  153. package/dist/runtime/components/product/sampleProduct/ProductVariation.d.vue.ts +11 -0
  154. package/dist/runtime/components/product/sampleProduct/ProductVariation.vue +61 -0
  155. package/dist/runtime/components/product/sampleProduct/ProductVariation.vue.d.ts +11 -0
  156. package/dist/runtime/components/product/sampleProduct/SampleDetails.d.vue.ts +7 -0
  157. package/dist/runtime/components/product/sampleProduct/SampleDetails.vue +74 -0
  158. package/dist/runtime/components/product/sampleProduct/SampleDetails.vue.d.ts +7 -0
  159. package/dist/runtime/components/product/sampleProduct/SampleFeatures.d.vue.ts +9 -0
  160. package/dist/runtime/components/product/sampleProduct/SampleFeatures.vue +63 -0
  161. package/dist/runtime/components/product/sampleProduct/SampleFeatures.vue.d.ts +9 -0
  162. package/dist/runtime/components/product/sampleProduct/index.d.vue.ts +8 -0
  163. package/dist/runtime/components/product/sampleProduct/index.vue +64 -0
  164. package/dist/runtime/components/product/sampleProduct/index.vue.d.ts +8 -0
  165. package/dist/runtime/components/product/simpleProduct/ProductVariation.d.vue.ts +11 -0
  166. package/dist/runtime/components/product/simpleProduct/ProductVariation.vue +61 -0
  167. package/dist/runtime/components/product/simpleProduct/ProductVariation.vue.d.ts +11 -0
  168. package/dist/runtime/components/product/simpleProduct/index.d.vue.ts +8 -0
  169. package/dist/runtime/components/product/simpleProduct/index.vue +34 -0
  170. package/dist/runtime/components/product/simpleProduct/index.vue.d.ts +8 -0
  171. package/dist/runtime/composables/Product/CustomProductDynamic/useAttributeTypeDynamic.d.ts +3 -0
  172. package/dist/runtime/composables/Product/CustomProductDynamic/useAttributeTypeDynamic.js +20 -0
  173. package/dist/runtime/composables/Product/CustomProductDynamic/useAttributesDynamic.d.ts +70 -0
  174. package/dist/runtime/composables/Product/CustomProductDynamic/useAttributesDynamic.js +63 -0
  175. package/dist/runtime/composables/Product/CustomProductDynamic/useCustomProductDynamic.d.ts +74 -0
  176. package/dist/runtime/composables/Product/CustomProductDynamic/useCustomProductDynamic.js +107 -0
  177. package/dist/runtime/composables/Product/CustomProductDynamic/useCustomeScriptDynamic.d.ts +159 -0
  178. package/dist/runtime/composables/Product/CustomProductDynamic/useCustomeScriptDynamic.js +2079 -0
  179. package/dist/runtime/composables/Product/CustomProductDynamic/useSingleAttributeDynamic.d.ts +4 -0
  180. package/dist/runtime/composables/Product/CustomProductDynamic/useSingleAttributeDynamic.js +27 -0
  181. package/dist/runtime/composables/Product/CustomProductDynamic/useSingleStepDynamic.d.ts +68 -0
  182. package/dist/runtime/composables/Product/CustomProductDynamic/useSingleStepDynamic.js +21 -0
  183. package/dist/runtime/composables/Product/CustomProductDynamic/useSingleValueDynamic.d.ts +67 -0
  184. package/dist/runtime/composables/Product/CustomProductDynamic/useSingleValueDynamic.js +15 -0
  185. package/dist/runtime/composables/Product/CustomProductDynamic/useStepsDynamic.d.ts +88 -0
  186. package/dist/runtime/composables/Product/CustomProductDynamic/useStepsDynamic.js +72 -0
  187. package/dist/runtime/composables/index.d.ts +8 -0
  188. package/dist/runtime/composables/index.js +8 -0
  189. package/dist/runtime/pages/flowrix-default.vue +15 -6
  190. package/dist/runtime/plugins/bootstrap.client.d.ts +2 -0
  191. package/dist/runtime/plugins/bootstrap.client.js +9 -0
  192. package/dist/runtime/server/api/cart/related.js +15 -2
  193. package/package.json +1 -1
@@ -0,0 +1,417 @@
1
+ <script setup>
2
+ const authStore = useAuthStore();
3
+ const isAuthenticated = computed(() => authStore.isAuthenticated);
4
+ const props = defineProps({
5
+ product: {
6
+ type: Object,
7
+ required: true
8
+ }
9
+ });
10
+ const {
11
+ fetchWishlists,
12
+ fetchWishlistProducts,
13
+ createWishlist,
14
+ addToWishlist,
15
+ removeFromWishlist,
16
+ wishlists,
17
+ wishlistProducts,
18
+ loading: isLoading
19
+ } = useWishlists();
20
+ const showDropdown = ref(false);
21
+ const showCreateModal = ref(false);
22
+ const newWishlistName = ref("");
23
+ const errorMessage = ref("");
24
+ const successMessage = ref("");
25
+ const isCreating = ref(false);
26
+ const isAddingToWishlist = ref(false);
27
+ const addingToWishlistId = ref(null);
28
+ const wishlistInput = ref(null);
29
+ console.log("\u{1F510} Current isAuthenticated:", isAuthenticated.value);
30
+ console.log("\u{1F510} Auth Store state:", authStore);
31
+ const isInAnyWishlist = computed(() => {
32
+ if (!props.product?.slug) return false;
33
+ return wishlists.value.some(
34
+ (wishlist) => isProductInWishlist(wishlist.id)
35
+ );
36
+ });
37
+ const loadWishlistProducts = async (wishlistId) => {
38
+ try {
39
+ await fetchWishlistProducts(wishlistId);
40
+ } catch (error) {
41
+ console.error(`Failed to fetch products for wishlist ${wishlistId}:`, error);
42
+ }
43
+ };
44
+ const loadWishlists = async () => {
45
+ try {
46
+ await fetchWishlists();
47
+ console.log("\u2705 Wishlists loaded:", wishlists.value);
48
+ } catch (error) {
49
+ console.error("Failed to load wishlists:", error);
50
+ }
51
+ };
52
+ onMounted(async () => {
53
+ console.log("\u{1F504} onMounted - isAuthenticated:", isAuthenticated.value);
54
+ if (isAuthenticated.value) {
55
+ await loadWishlists();
56
+ }
57
+ });
58
+ const transformData = (data) => {
59
+ const attribute_id = {};
60
+ const fraction = {};
61
+ for (const [key, value] of Object.entries(data)) {
62
+ const match = key.match(/(attribute_id|fraction)\[(\d+)\]/);
63
+ if (match) {
64
+ const [, type, id] = match;
65
+ if (type === "attribute_id") {
66
+ attribute_id[id] = value;
67
+ } else if (type === "fraction") {
68
+ fraction[id] = value;
69
+ }
70
+ }
71
+ }
72
+ return { attribute_id, fraction };
73
+ };
74
+ const getFormData = () => {
75
+ const customProductForm = document.querySelector(".customproductform");
76
+ const form = customProductForm;
77
+ let finalData = {};
78
+ if (form) {
79
+ const formData = new FormData(form);
80
+ const formObject = {};
81
+ const visibleFields = Array.from(formData.entries()).filter(([key]) => {
82
+ const element = form.querySelector(`[name="${key}"]`);
83
+ const parentElement = element ? element.closest(".single-attribute") || element : null;
84
+ return parentElement && window.getComputedStyle(parentElement).display === "block";
85
+ });
86
+ visibleFields.forEach(([key, value]) => {
87
+ formObject[key] = value;
88
+ });
89
+ finalData = transformData(formObject);
90
+ }
91
+ return finalData;
92
+ };
93
+ const showSuccessMessage = (message) => {
94
+ successMessage.value = message;
95
+ setTimeout(() => {
96
+ successMessage.value = "";
97
+ }, 3e3);
98
+ };
99
+ const showErrorMessage = (message) => {
100
+ errorMessage.value = message;
101
+ setTimeout(() => {
102
+ errorMessage.value = "";
103
+ }, 5e3);
104
+ };
105
+ const handleCreateWishlist = async () => {
106
+ console.log("\u{1F4DD} handleCreateWishlist - isAuthenticated:", isAuthenticated.value);
107
+ if (!isAuthenticated.value) {
108
+ console.log("\u{1F6AB} Not authenticated, redirecting to login");
109
+ return navigateTo("/login");
110
+ }
111
+ if (!newWishlistName.value.trim()) {
112
+ showErrorMessage("Wishlist name cannot be empty");
113
+ return;
114
+ }
115
+ isCreating.value = true;
116
+ errorMessage.value = "";
117
+ successMessage.value = "";
118
+ try {
119
+ const createData = {
120
+ title: newWishlistName.value.trim(),
121
+ default: false
122
+ };
123
+ const createRes = await createWishlist(createData);
124
+ if (createRes.status === "Success") {
125
+ const formDataObj = getFormData();
126
+ let addData = {};
127
+ if (Object.keys(formDataObj).length > 0) {
128
+ addData = {
129
+ attribute_id: formDataObj.attribute_id || {},
130
+ fraction: formDataObj.fraction || {}
131
+ };
132
+ }
133
+ await addToWishlist(createRes.data.id, props.product.slug, addData);
134
+ showSuccessMessage(`Created wishlist "${newWishlistName.value}" and added product`);
135
+ await loadWishlists();
136
+ setTimeout(() => {
137
+ closeCreateModal();
138
+ }, 1500);
139
+ } else {
140
+ showErrorMessage(createRes.message || "Failed to create wishlist. Please try again.");
141
+ }
142
+ } catch (error) {
143
+ console.error("Create wishlist error:", error);
144
+ showErrorMessage(error.message || "Failed to create wishlist. Please try again.");
145
+ } finally {
146
+ isCreating.value = false;
147
+ }
148
+ };
149
+ const addToWishlistHandler = async (wishlistId) => {
150
+ console.log("\u2795 addToWishlistHandler - isAuthenticated:", isAuthenticated.value);
151
+ if (!isAuthenticated.value) {
152
+ console.log("\u{1F6AB} Not authenticated, redirecting to login");
153
+ return navigateTo("/login");
154
+ }
155
+ if (!props.product || !props.product.slug) {
156
+ console.error("Product is not available or missing slug");
157
+ showErrorMessage("Product information is missing");
158
+ return false;
159
+ }
160
+ try {
161
+ isAddingToWishlist.value = true;
162
+ addingToWishlistId.value = wishlistId;
163
+ errorMessage.value = "";
164
+ const formDataObj = getFormData();
165
+ console.log("\u{1F4DD} addToWishlistHandler - Form Data:", formDataObj);
166
+ let addData = {};
167
+ if (Object.keys(formDataObj).length > 0) {
168
+ addData = {
169
+ attribute_id: formDataObj.attribute_id || {},
170
+ fraction: formDataObj.fraction || {}
171
+ };
172
+ }
173
+ console.log("\u{1F680} Sending addToWishlist payload:", { wishlistId, slug: props.product.slug, addData });
174
+ const response = await addToWishlist(wishlistId, props.product.slug, addData);
175
+ console.log("\u{1F4E9} addToWishlist response:", response);
176
+ if (response.status === "Success") {
177
+ await loadWishlistProducts(wishlistId);
178
+ showSuccessMessage("Product added to wishlist successfully!");
179
+ return true;
180
+ } else {
181
+ console.error("Failed to add to wishlist:", response.message);
182
+ showErrorMessage(response.message || "Failed to add product to wishlist");
183
+ return false;
184
+ }
185
+ } catch (error) {
186
+ console.error("Failed to add to wishlist:", error);
187
+ showErrorMessage(error.message || "Failed to add product to wishlist");
188
+ return false;
189
+ } finally {
190
+ isAddingToWishlist.value = false;
191
+ addingToWishlistId.value = null;
192
+ }
193
+ };
194
+ const removeFromWishlistHandler = async (wishlistId) => {
195
+ try {
196
+ isAddingToWishlist.value = true;
197
+ addingToWishlistId.value = wishlistId;
198
+ errorMessage.value = "";
199
+ const response = await removeFromWishlist(wishlistId, props.product.slug);
200
+ if (response.status === "Success") {
201
+ await loadWishlistProducts(wishlistId);
202
+ showSuccessMessage("Product removed from wishlist successfully!");
203
+ return true;
204
+ } else {
205
+ console.error("Failed to remove from wishlist:", response.message);
206
+ showErrorMessage(response.message || "Failed to remove product from wishlist");
207
+ return false;
208
+ }
209
+ } catch (error) {
210
+ console.error("Failed to remove from wishlist:", error);
211
+ showErrorMessage(error.message || "Failed to remove product from wishlist");
212
+ return false;
213
+ } finally {
214
+ isAddingToWishlist.value = false;
215
+ addingToWishlistId.value = null;
216
+ }
217
+ };
218
+ const toggleProductInWishlist = async (wishlistId) => {
219
+ const lists = wishlistProducts(wishlistId);
220
+ if (!lists || !lists.value || !lists.value.length) {
221
+ await loadWishlistProducts(wishlistId);
222
+ }
223
+ const isCurrentlyInWishlist = isProductInWishlist(wishlistId);
224
+ if (isCurrentlyInWishlist) {
225
+ await removeFromWishlistHandler(wishlistId);
226
+ } else {
227
+ await addToWishlistHandler(wishlistId);
228
+ }
229
+ closeDropdown();
230
+ };
231
+ const isProductInWishlist = (wishlistId) => {
232
+ if (!props.product?.slug) return false;
233
+ const products = wishlistProducts(wishlistId).value || [];
234
+ return products.some((item) => item.productSlug === props.product.slug);
235
+ };
236
+ const toggleDropdown = async () => {
237
+ console.log("\u{1F53D} toggleDropdown - isAuthenticated:", isAuthenticated.value);
238
+ console.log("\u{1F53D} Auth Store:", authStore);
239
+ if (!isAuthenticated.value) {
240
+ console.log("\u{1F6AB} Not authenticated, redirecting to login");
241
+ navigateTo("/login");
242
+ return;
243
+ }
244
+ if (!showDropdown.value && wishlists.value.length === 0) {
245
+ await loadWishlists();
246
+ }
247
+ showDropdown.value = !showDropdown.value;
248
+ };
249
+ const closeDropdown = () => {
250
+ showDropdown.value = false;
251
+ };
252
+ const openCreateModal = () => {
253
+ showCreateModal.value = true;
254
+ showDropdown.value = false;
255
+ nextTick(() => {
256
+ if (wishlistInput.value) {
257
+ wishlistInput.value.focus();
258
+ }
259
+ });
260
+ };
261
+ const closeCreateModal = () => {
262
+ showCreateModal.value = false;
263
+ newWishlistName.value = "";
264
+ errorMessage.value = "";
265
+ successMessage.value = "";
266
+ };
267
+ const wishlistLabel = computed(
268
+ () => isLoading.value ? "Loading..." : isInAnyWishlist.value ? "In Wishlist" : "Add to my wishlist"
269
+ );
270
+ watch([newWishlistName], () => {
271
+ if (errorMessage.value) {
272
+ errorMessage.value = "";
273
+ }
274
+ });
275
+ </script>
276
+
277
+ <template>
278
+ <div class="dropdown position-relative d-inline-flex w-100">
279
+ <div class="w-100">
280
+ <a @click="toggleDropdown" class="rounded-5 d-flex align-items-center justify-content-center gap-2 w-100 py-3"
281
+ :class="{
282
+ 'btn-outline-danger': isInAnyWishlist,
283
+ 'shadow-sm': showDropdown
284
+ }" :disabled="isLoading">
285
+ <div v-if="isLoading" class="spinner-border spinner-border-sm" role="status">
286
+ <span class="visually-hidden">Loading...</span>
287
+ </div>
288
+
289
+ <i class="text-secondary">
290
+ <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24">
291
+ <path fill="currentColor"
292
+ d="M6.979 3.074a6 6 0 0 1 4.988 1.425l.037.033l.034-.03a6 6 0 0 1 4.733-1.44l.246.036a6 6 0 0 1 3.364 10.008l-.18.185l-.048.041l-7.45 7.379a1 1 0 0 1-1.313.082l-.094-.082l-7.493-7.422A6 6 0 0 1 6.979 3.074" />
293
+ </svg>
294
+ </i>
295
+
296
+ <span class="fw-medium text-gray" style="cursor:pointer">
297
+ {{ wishlistLabel }}
298
+ </span>
299
+
300
+ <svg v-if="wishlists.length > 0 && !isLoading" xmlns="http://www.w3.org/2000/svg" width="16" height="16"
301
+ viewBox="0 0 24 24" :class="{ 'rotate-180': showDropdown }" style="transition: transform 0.3s ease;">
302
+ <path fill="currentColor" d="M7.41 8.58L12 13.17l4.59-4.59L18 10l-6 6l-6-6l1.41-1.42Z" />
303
+ </svg>
304
+ </a>
305
+
306
+ <!-- Success/Error Messages below the button -->
307
+ <div v-if="successMessage || errorMessage" class="mt-2">
308
+ <div v-if="successMessage" class="alert alert-success alert-dismissible fade show py-1 mb-0" role="alert">
309
+ <small>{{ successMessage }}</small>
310
+ <button type="button" class="btn-close btn-close-sm" @click="successMessage = ''"></button>
311
+ </div>
312
+
313
+ <div v-if="errorMessage" class="alert alert-danger alert-dismissible fade show py-1 mb-0" role="alert">
314
+ <small>{{ errorMessage }}</small>
315
+ <button type="button" class="btn-close btn-close-sm" @click="errorMessage = ''"></button>
316
+ </div>
317
+ </div>
318
+ </div>
319
+
320
+ <div v-show="showDropdown" class="dropdown-menu show position-absolute mt-1"
321
+ style="min-width: 250px; max-height: 300px;">
322
+ <div v-if="wishlists.length > 0" style="max-height: 200px; overflow-y: auto;">
323
+ <a v-for="wishlist in wishlists" :key="wishlist.id"
324
+ class="dropdown-item d-flex justify-content-between align-items-center py-2 cursor-pointer" :class="{
325
+ 'disabled': isAddingToWishlist,
326
+ 'bg-light': isAddingToWishlist && addingToWishlistId === wishlist.id
327
+ }" @click="!isAddingToWishlist ? toggleProductInWishlist(wishlist.id) : null" :disabled="isAddingToWishlist">
328
+ <span class="small">{{ wishlist.title }}</span>
329
+
330
+ <div class="ms-2">
331
+ <div v-if="isAddingToWishlist && addingToWishlistId === wishlist.id"
332
+ class="spinner-border spinner-border-sm text-primary" role="status">
333
+ <span class="visually-hidden">Loading...</span>
334
+ </div>
335
+ <span v-else-if="isProductInWishlist(wishlist.id)" class="badge bg-success rounded-pill">✓</span>
336
+ </div>
337
+ </a>
338
+ </div>
339
+
340
+ <div v-else-if="isLoading" class="dropdown-item-text text-center py-3">
341
+ <div class="spinner-border spinner-border-sm text-primary mb-2" role="status">
342
+ <span class="visually-hidden">Loading...</span>
343
+ </div>
344
+ <p class="mb-0 text-muted small">Loading wishlists...</p>
345
+ </div>
346
+
347
+ <div v-else class="dropdown-item-text text-center py-3">
348
+ <p class="mb-0 text-muted small">No wishlists yet</p>
349
+ </div>
350
+
351
+ <hr class="dropdown-divider my-1">
352
+
353
+ <a class="dropdown-item d-flex align-items-center py-2 text-primary" :class="{ 'disabled': isAddingToWishlist }"
354
+ @click="!isAddingToWishlist ? openCreateModal() : null" :disabled="isAddingToWishlist">
355
+ <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 20 20" class="me-2">
356
+ <path fill="currentColor"
357
+ d="M10 0c.423 0 .766.343.766.766v8.467h8.468a.766.766 0 1 1 0 1.533h-8.468v8.468a.766.766 0 1 1-1.532 0l-.001-8.468H.766a.766.766 0 0 1 0-1.532l8.467-.001V.766A.77.77 0 0 1 10 0">
358
+ </path>
359
+ </svg>
360
+ <small>Create New Wishlist</small>
361
+ </a>
362
+ </div>
363
+
364
+ <!-- Create Wishlist Modal -->
365
+ <div v-if="showCreateModal" class="modal fade show d-block" tabindex="-1"
366
+ style="background-color: rgba(0,0,0,0.5);">
367
+ <div class="modal-dialog modal-dialog-centered">
368
+ <div class="modal-content">
369
+ <div class="modal-header">
370
+ <h5 class="modal-title">Create New Wishlist</h5>
371
+ <a type="button" class="btn-close" @click="closeCreateModal"></a>
372
+ </div>
373
+ <div class="modal-body">
374
+ <form @submit.prevent="handleCreateWishlist">
375
+ <div class="mb-3">
376
+ <label for="wishlistName" class="form-label">Wishlist Name</label>
377
+ <input id="wishlistName" v-model="newWishlistName" ref="wishlistInput" type="text" class="form-control"
378
+ placeholder="Enter wishlist name" :disabled="isCreating" required />
379
+ </div>
380
+
381
+ <!-- Success/Error Messages in Modal -->
382
+ <div v-if="successMessage" class="alert alert-success alert-dismissible fade show py-1 mb-2" role="alert">
383
+ <small>{{ successMessage }}</small>
384
+ <button type="button" class="btn-close btn-close-sm" @click="successMessage = ''"></button>
385
+ </div>
386
+
387
+ <div v-if="errorMessage" class="alert alert-danger alert-dismissible fade show py-1 mb-2" role="alert">
388
+ <small>{{ errorMessage }}</small>
389
+ <button type="button" class="btn-close btn-close-sm" @click="errorMessage = ''"></button>
390
+ </div>
391
+
392
+ <div class="d-flex gap-2 justify-content-end">
393
+ <a type="button" class="btn btn-secondary btn-sm" @click="closeCreateModal" :disabled="isCreating">
394
+ Cancel
395
+ </a>
396
+ <button type="submit" class="btn btn-primary btn-sm d-flex align-items-center gap-1"
397
+ :disabled="!newWishlistName.trim() || isCreating">
398
+ <div v-if="isCreating" class="spinner-border spinner-border-sm" role="status">
399
+ <span class="visually-hidden">Loading...</span>
400
+ </div>
401
+ <span>{{ isCreating ? 'Creating...' : 'Create Wishlist' }}</span>
402
+ </button>
403
+ </div>
404
+ </form>
405
+ </div>
406
+ </div>
407
+ </div>
408
+ </div>
409
+
410
+ <div v-if="showDropdown" class="position-fixed top-0 start-0 w-100 h-100" style="z-index: 1;"
411
+ @click="closeDropdown"></div>
412
+ </div>
413
+ </template>
414
+
415
+ <style scoped>
416
+ .cursor-pointer{cursor:pointer}.dropdown-menu{box-shadow:0 .5rem 1rem rgba(0,0,0,.125);z-index:1050}.dropdown-item:hover:not(.disabled){background-color:var(--bs-dropdown-link-hover-bg)}.dropdown-item.disabled{opacity:.6;pointer-events:none}.rotate-180{transform:rotate(180deg)}.modal{z-index:1055}.dropdown-menu>div:first-child::-webkit-scrollbar{width:6px}.dropdown-menu>div:first-child::-webkit-scrollbar-track{background:#f1f1f1;border-radius:10px}.dropdown-menu>div:first-child::-webkit-scrollbar-thumb{background:#c1c1c1;border-radius:10px}.dropdown-menu>div:first-child::-webkit-scrollbar-thumb:hover{background:#a8a8a8}.text-gray{color:var(--bs-light-gray)}.alert{margin-bottom:0;padding:.25rem .5rem}.btn-close-sm{font-size:.7rem;padding:.5rem}@media (max-width:576px){.dropdown-menu{min-width:200px}.modal-dialog{margin:1rem}}
417
+ </style>
@@ -0,0 +1,9 @@
1
+ declare const _default: typeof __VLS_export;
2
+ export default _default;
3
+ declare const __VLS_export: import("vue").DefineComponent<{}, {
4
+ $props: Partial<typeof props>;
5
+ product: Record<string, any>;
6
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
7
+ declare const props: {
8
+ readonly product: Record<string, any>;
9
+ };
@@ -0,0 +1,13 @@
1
+ declare const _default: typeof __VLS_export;
2
+ export default _default;
3
+ declare const __VLS_export: import("vue").DefineComponent<{}, {
4
+ wishlists: any;
5
+ isInWishlist: (productId: any, wishlistId: any) => any;
6
+ $emit: typeof emit;
7
+ $props: Partial<typeof __VLS_props>;
8
+ product?: any;
9
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
10
+ declare const emit: (event: "closewish", ...args: any[]) => void;
11
+ declare const __VLS_props: {
12
+ readonly product?: any;
13
+ };
@@ -0,0 +1,229 @@
1
+ <script setup>
2
+ const { product } = defineProps(["product"]);
3
+ const {
4
+ fetchWishlists,
5
+ createWishlist,
6
+ addToWishlist,
7
+ wishlists,
8
+ wishlistProducts,
9
+ loading: isWishlistLoading
10
+ } = useWishlists();
11
+ const emit = defineEmits(["closewish"]);
12
+ const router = useRouter();
13
+ const route = useRoute();
14
+ const authStore = useAuthStore();
15
+ const isAuthenticated = computed(() => authStore.isAuthenticated);
16
+ const createMode = ref(false);
17
+ const selectedWishlist = ref("");
18
+ const successMessage = ref("");
19
+ const errorMessage = ref("");
20
+ const checkAuthAndRedirect = () => {
21
+ if (!isAuthenticated.value) {
22
+ const returnUrl = route.fullPath;
23
+ router.push({
24
+ path: "/login",
25
+ query: { redirect: returnUrl }
26
+ });
27
+ return false;
28
+ }
29
+ return true;
30
+ };
31
+ onMounted(async () => {
32
+ if (!checkAuthAndRedirect()) {
33
+ emit("closewish");
34
+ return;
35
+ }
36
+ try {
37
+ await fetchWishlists();
38
+ } catch (error) {
39
+ console.error("Failed to fetch wishlists:", error);
40
+ errorMessage.value = "Failed to load wishlists";
41
+ }
42
+ });
43
+ const closeWisthmodal = () => {
44
+ emit("closewish");
45
+ };
46
+ const handleCreateWishlist = async () => {
47
+ if (!checkAuthAndRedirect()) {
48
+ emit("closewish");
49
+ return;
50
+ }
51
+ if (!selectedWishlist.value?.trim()) {
52
+ errorMessage.value = "Wishlist name is required!";
53
+ return;
54
+ }
55
+ try {
56
+ const wishlistData = {
57
+ title: selectedWishlist.value.trim(),
58
+ default: false
59
+ };
60
+ const response = await createWishlist(wishlistData);
61
+ if (response.status === "Success") {
62
+ successMessage.value = "Wishlist created successfully!";
63
+ if (response.data && product?.slug) {
64
+ await addProductToWishlist(response.data.id);
65
+ } else {
66
+ setTimeout(() => {
67
+ closeWisthmodal();
68
+ }, 1500);
69
+ }
70
+ } else {
71
+ errorMessage.value = response.message || "Failed to create wishlist";
72
+ }
73
+ } catch (error) {
74
+ console.error("Create wishlist error:", error);
75
+ errorMessage.value = error.message || "Failed to create wishlist";
76
+ }
77
+ };
78
+ const addProductToWishlist = async (wishlistId) => {
79
+ if (!checkAuthAndRedirect()) {
80
+ emit("closewish");
81
+ return;
82
+ }
83
+ if (!product?.slug) {
84
+ errorMessage.value = "Product information is missing";
85
+ return;
86
+ }
87
+ try {
88
+ const response = await addToWishlist(wishlistId, product.slug);
89
+ if (response.status === "Success") {
90
+ successMessage.value = "Product added to wishlist successfully!";
91
+ setTimeout(() => {
92
+ closeWisthmodal();
93
+ }, 1500);
94
+ } else {
95
+ errorMessage.value = response.message || "Failed to add product to wishlist";
96
+ }
97
+ } catch (error) {
98
+ console.error("Add to wishlist error:", error);
99
+ errorMessage.value = error.message || "Failed to add product to wishlist";
100
+ }
101
+ };
102
+ const handleWishlistAction = async (wishlistId) => {
103
+ if (!checkAuthAndRedirect()) {
104
+ emit("closewish");
105
+ return;
106
+ }
107
+ if (!wishlistId) {
108
+ errorMessage.value = "Please select a wishlist";
109
+ return;
110
+ }
111
+ await addProductToWishlist(wishlistId);
112
+ };
113
+ const handleKeypress = (event) => {
114
+ if (event.key === "Enter") {
115
+ if (createMode.value) {
116
+ handleCreateWishlist();
117
+ } else if (selectedWishlist.value) {
118
+ handleWishlistAction(selectedWishlist.value);
119
+ }
120
+ }
121
+ };
122
+ watch([selectedWishlist, createMode], () => {
123
+ if (errorMessage.value) {
124
+ errorMessage.value = "";
125
+ }
126
+ });
127
+ const isInWishlist = (productId, wishlistId) => {
128
+ if (!product?.slug) return false;
129
+ const products = wishlistProducts(wishlistId).value || [];
130
+ return products.some((item) => item.productSlug === product.slug || item.productId === productId);
131
+ };
132
+ defineExpose({
133
+ wishlists,
134
+ isInWishlist
135
+ });
136
+ </script>
137
+
138
+ <template>
139
+ <div class="wishlist-backdrop fade show">
140
+ <div class="wishlist-content">
141
+ <div class="d-flex justify-content-between align-items-center mb-1">
142
+ <h6 class="modal-title mb-0">Add to Wishlist</h6>
143
+ <button type="button" class="btn-close" @click="closeWisthmodal" aria-label="Close"></button>
144
+ </div>
145
+
146
+ <div>
147
+ <!-- Success/Error Messages -->
148
+ <div v-if="successMessage" class="alert alert-success alert-dismissible fade show py-1 mb-2" role="alert">
149
+ <small>{{ successMessage }}</small>
150
+ <button type="button" class="btn-close btn-close-sm" @click="successMessage = ''"></button>
151
+ </div>
152
+
153
+ <div v-if="errorMessage" class="alert alert-danger alert-dismissible fade show py-1 mb-2" role="alert">
154
+ <small>{{ errorMessage }}</small>
155
+ <button type="button" class="btn-close btn-close-sm" @click="errorMessage = ''"></button>
156
+ </div>
157
+
158
+ <!-- Select Existing Wishlist -->
159
+ <div v-if="!createMode">
160
+ <div class="mb-1">
161
+ <label for="wishlistSelect" class="form-label small mb-1">Select Wishlist</label>
162
+ <select
163
+ v-model="selectedWishlist"
164
+ class="form-select form-select-sm"
165
+ id="wishlistSelect"
166
+ :disabled="isWishlistLoading"
167
+ >
168
+ <option value="">Select a Wishlist</option>
169
+ <template v-for="wishlist in wishlists" :key="wishlist.id">
170
+ <option :value="wishlist.id">
171
+ {{ wishlist.title }}
172
+ </option>
173
+ </template>
174
+ </select>
175
+ </div>
176
+
177
+ <button
178
+ @click="handleWishlistAction(selectedWishlist)"
179
+ :disabled="!selectedWishlist || isWishlistLoading || !product?.slug"
180
+ class="btn btn-secondary text-white w-100 mb-1 btn-sm"
181
+ >
182
+ <span v-if="isWishlistLoading" class="spinner-border spinner-border-sm me-1" role="status"></span>
183
+ <small>Add to Wishlist</small>
184
+ </button>
185
+
186
+ <div class="text-center">
187
+ <a href="#" @click.prevent="createMode = true" class="small text-primary text-decoration-none">
188
+ + Create new wishlist
189
+ </a>
190
+ </div>
191
+ </div>
192
+
193
+ <!-- Create New Wishlist -->
194
+ <div v-else>
195
+ <div class="mb-1">
196
+ <label for="newWishlistInput" class="form-label small mb-1">New Wishlist Name</label>
197
+ <input
198
+ v-model="selectedWishlist"
199
+ id="newWishlistInput"
200
+ placeholder="Enter name"
201
+ class="form-control form-control-sm"
202
+ @keypress="handleKeypress"
203
+ :disabled="isWishlistLoading"
204
+ />
205
+ </div>
206
+
207
+ <button
208
+ @click="handleCreateWishlist"
209
+ :disabled="!selectedWishlist?.trim() || isWishlistLoading"
210
+ class="btn btn-secondary text-white btn-sm w-100 mb-1"
211
+ >
212
+ <span v-if="isWishlistLoading" class="spinner-border spinner-border-sm me-1" role="status"></span>
213
+ <small>Create & Add</small>
214
+ </button>
215
+
216
+ <div class="text-center">
217
+ <a href="#" @click.prevent="createMode = false" class="small text-muted text-decoration-none">
218
+ Cancel
219
+ </a>
220
+ </div>
221
+ </div>
222
+ </div>
223
+ </div>
224
+ </div>
225
+ </template>
226
+
227
+ <style scoped>
228
+ .wishlist-backdrop{align-items:center;animation:fadeIn .3s ease-in-out;background:rgba(0,0,0,.6);display:flex;height:100%;justify-content:center;left:0;position:absolute;top:0;width:100%;z-index:3}.wishlist-content{animation:slideUp .3s ease-in-out;background:#fff;border-radius:.5rem;box-shadow:0 8px 24px rgba(0,0,0,.2);max-width:90%;padding:.75rem;width:260px}.modal-title{font-size:.95rem;font-weight:600}.form-label{font-size:.75rem;font-weight:500}.btn-sm,.form-control-sm,.form-select-sm{font-size:.8rem;padding:.25rem .5rem}.alert{margin-bottom:.5rem;padding:.25rem .5rem}.btn-close-sm{font-size:.7rem;padding:.5rem}.text-muted,.text-primary{text-decoration:none}.text-primary:hover{text-decoration:underline}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes slideUp{0%{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}@media (max-width:768px){.wishlist-content{padding:.5rem;width:240px}}
229
+ </style>
@@ -0,0 +1,13 @@
1
+ declare const _default: typeof __VLS_export;
2
+ export default _default;
3
+ declare const __VLS_export: import("vue").DefineComponent<{}, {
4
+ wishlists: any;
5
+ isInWishlist: (productId: any, wishlistId: any) => any;
6
+ $emit: typeof emit;
7
+ $props: Partial<typeof __VLS_props>;
8
+ product?: any;
9
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
10
+ declare const emit: (event: "closewish", ...args: any[]) => void;
11
+ declare const __VLS_props: {
12
+ readonly product?: any;
13
+ };