@agrada_digital/pbm 0.0.83 → 0.0.85

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.
package/dist/index.js CHANGED
@@ -77,37 +77,24 @@ function usePBMStore(selector) {
77
77
  // src/components/Header/index.tsx
78
78
  var import_jsx_runtime = require("react/jsx-runtime");
79
79
  function Header({ originalProductPrice }) {
80
- const { targetProduct } = usePBMStore();
80
+ const { targetProduct, state } = usePBMStore();
81
81
  const Price = targetProduct?.listPrice || originalProductPrice;
82
82
  const Discount = Price * ((targetProduct?.discountMax || 0) / 100);
83
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
84
- "header",
85
- {
86
- className: "flex items-center justify-between w-full p-0.5 rounded-xl bg-[#44c2c0]/30 mt-5",
87
- id: "header_pbm",
88
- children: [
89
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
90
- "span",
91
- {
92
- className: "py-1 px-6 rounded-xl bg-[#44c2c0] shrink-0 text-white text-xl font-bold flex items-center justify-start gap-2 relative",
93
- "data-testid": "test_id_header_price",
94
- id: "header_price",
95
- children: [
96
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: "absolute -top-6 left-10 bg-emerald-500 px-4 py-1 rounded-t-lg text-xs font-medium text-white", children: [
97
- targetProduct?.discountMax,
98
- "% OFF"
99
- ] }),
100
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("svg", { width: "36px", height: "36px", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
101
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("g", { id: "SVGRepo_bgCarrier", strokeWidth: "0" }),
102
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("g", { id: "SVGRepo_tracerCarrier", strokeLinecap: "round", strokeLinejoin: "round" }),
103
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("g", { id: "SVGRepo_iconCarrier", children: [
104
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M10 8.99998C10.5523 8.99998 11 9.44769 11 9.99998C11 10.5523 10.5523 11 10 11C9.44775 11 9.00004 10.5523 9.00004 9.99998C9.00004 9.44769 9.44775 8.99998 10 8.99998Z", fill: "#fff" }),
105
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M13 14C13 14.5523 13.4478 15 14 15C14.5523 15 15 14.5523 15 14C15 13.4477 14.5523 13 14 13C13.4478 13 13 13.4477 13 14Z", fill: "#fff" }),
106
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M10.7071 14.7071L14.7071 10.7071C15.0977 10.3166 15.0977 9.6834 14.7071 9.29287C14.3166 8.90235 13.6835 8.90235 13.2929 9.29287L9.29293 13.2929C8.90241 13.6834 8.90241 14.3166 9.29293 14.7071C9.68346 15.0976 10.3166 15.0976 10.7071 14.7071Z", fill: "#fff" }),
107
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M16.3117 4.07145L15.1708 4.34503L14.5575 3.34485C13.3869 1.43575 10.6131 1.43575 9.44254 3.34485L8.82926 4.34503L7.68836 4.07145C5.51069 3.54925 3.54931 5.51063 4.07151 7.6883L4.34509 8.8292L3.34491 9.44248C1.43581 10.6131 1.43581 13.3869 3.34491 14.5575L4.34509 15.1708L4.07151 16.3117C3.54931 18.4893 5.51069 20.4507 7.68836 19.9285L8.82926 19.6549L9.44254 20.6551C10.6131 22.5642 13.3869 22.5642 14.5575 20.6551L15.1708 19.6549L16.3117 19.9285C18.4894 20.4507 20.4508 18.4893 19.9286 16.3117L19.655 15.1708L20.6552 14.5575C22.5643 13.3869 22.5643 10.6131 20.6552 9.44248L19.655 8.8292L19.9286 7.6883C20.4508 5.51063 18.4894 3.54925 16.3117 4.07145ZM11.1475 4.3903C11.5377 3.75393 12.4623 3.75393 12.8525 4.3903L13.8454 6.00951C14.0717 6.37867 14.51 6.56019 14.9311 6.45922L16.7781 6.01631C17.504 5.84225 18.1578 6.49604 17.9837 7.22193L17.5408 9.06894C17.4398 9.49003 17.6213 9.92827 17.9905 10.1546L19.6097 11.1475C20.2461 11.5377 20.2461 12.4623 19.6097 12.8525L17.9905 13.8453C17.6213 14.0717 17.4398 14.5099 17.5408 14.931L17.9837 16.778C18.1578 17.5039 17.504 18.1577 16.7781 17.9836L14.9311 17.5407C14.51 17.4398 14.0717 17.6213 13.8454 17.9904L12.8525 19.6097C12.4623 20.246 11.5377 20.246 11.1475 19.6097L10.1547 17.9904C9.92833 17.6213 9.49009 17.4398 9.069 17.5407L7.22199 17.9836C6.4961 18.1577 5.84231 17.5039 6.01637 16.778L6.45928 14.931C6.56026 14.5099 6.37873 14.0717 6.00957 13.8453L4.39036 12.8525C3.75399 12.4623 3.75399 11.5377 4.39036 11.1475L6.00957 10.1546C6.37873 9.92827 6.56026 9.49003 6.45928 9.06894L6.01637 7.22193C5.84231 6.49604 6.4961 5.84225 7.22199 6.01631L9.069 6.45922C9.49009 6.56019 9.92833 6.37867 10.1547 6.00951L11.1475 4.3903Z", fill: "#fff" })
108
- ] })
109
- ] }),
110
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("section", { className: "flex flex-col items-start justify-center-safe gap-0", children: [
83
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
84
+ targetProduct?.informativeMessage && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "absolute w-11/12 -top-6 bg-emerald-500 px-4 py-1 rounded-lg text-sm text-center font-medium text-white", children: targetProduct?.informativeMessage }),
85
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
86
+ "header",
87
+ {
88
+ className: "flex items-center justify-between w-full p-0.5 rounded-xl bg-[#44c2c0]/30 mt-5",
89
+ id: "header_pbm",
90
+ children: [
91
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
92
+ "span",
93
+ {
94
+ className: "py-1 px-6 rounded-xl bg-[#44c2c0] shrink-0 text-white text-xl font-bold flex items-center justify-start gap-2 relative",
95
+ "data-testid": "test_id_header_price",
96
+ id: "header_price",
97
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("section", { className: "flex items-center gap-2 justify-center-safe", children: [
111
98
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "line-through text-sm font-light", children: Number(Price)?.toLocaleString("pt-BR", {
112
99
  currency: "BRL",
113
100
  currencyDisplay: "symbol",
@@ -121,13 +108,13 @@ function Header({ originalProductPrice }) {
121
108
  style: "currency"
122
109
  })
123
110
  ] })
124
- ]
125
- }
126
- ),
127
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h1", { id: "header_title", className: "text-center w-full text-[#339c9b] font-bold text-xs px-4 md:text-sm", children: "Desconto de Laborat\xF3rio" })
128
- ]
129
- }
130
- );
111
+ }
112
+ ),
113
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h1", { id: "header_title", className: "text-center w-full text-[#339c9b] font-bold text-xs px-4 md:text-sm", children: "Desconto de Laborat\xF3rio" })
114
+ ]
115
+ }
116
+ )
117
+ ] });
131
118
  }
132
119
  var Header_default = Header;
133
120
 
@@ -158,27 +145,24 @@ var Container_default = Container;
158
145
  var import_classnames2 = __toESM(require("classnames"));
159
146
  var import_jsx_runtime3 = require("react/jsx-runtime");
160
147
  function Footer() {
161
- const { targetProduct, setTargetProduct, state } = usePBMStore();
162
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("footer", { className: "w-full h-auto relative", id: "footer_pbm", children: [
163
- state !== "isActivated" && targetProduct?.informativeMessage && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: "text-start mb-3 font-semibold text-sm text-amber-500", children: targetProduct?.informativeMessage }),
164
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("section", { className: (0, import_classnames2.default)("flex items-center w-full h-auto gap-4", { "justify-center": targetProduct?.industryLogo, "justify-start": !targetProduct?.industryLogo }), children: [
165
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("section", { className: "w-4/5 h-auto", children: [
166
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("h3", { className: "text-start font-semibold text-sm", children: "Economize com o benef\xEDcio do laborat\xF3rio." }),
167
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: "text-start font-normal text-sm", children: "Este produto tem pre\xE7o exclusivo para clientes cadastrados no programa." })
168
- ] }),
169
- targetProduct?.industryLogo && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
170
- "img",
171
- {
172
- src: targetProduct.industryLogo,
173
- alt: "parceiro",
174
- className: "w-1/5 min-w-20 h-auto aspect-auto rounded-xl",
175
- loading: "eager",
176
- id: "footer_industry_logo_pbm",
177
- "data-testid": "footer_industry_logo_pbm"
178
- }
179
- )
180
- ] })
181
- ] });
148
+ const { targetProduct, state } = usePBMStore();
149
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("footer", { className: "w-full h-auto relative", id: "footer_pbm", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("section", { className: (0, import_classnames2.default)("flex items-center w-full h-auto gap-4", { "justify-center": targetProduct?.industryLogo, "justify-start": !targetProduct?.industryLogo }), children: [
150
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("section", { className: "w-4/5 h-auto", children: [
151
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("h3", { className: "text-start font-semibold text-sm", children: "Economize com o benef\xEDcio do laborat\xF3rio." }),
152
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: "text-start font-normal text-sm", children: "Este produto tem pre\xE7o exclusivo para clientes cadastrados no programa." })
153
+ ] }),
154
+ targetProduct?.industryLogo && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
155
+ "img",
156
+ {
157
+ src: targetProduct.industryLogo,
158
+ alt: "parceiro",
159
+ className: "w-1/5 min-w-20 h-auto aspect-auto rounded-xl",
160
+ loading: "eager",
161
+ id: "footer_industry_logo_pbm",
162
+ "data-testid": "footer_industry_logo_pbm"
163
+ }
164
+ )
165
+ ] }) });
182
166
  }
183
167
  var Footer_default = Footer;
184
168
 
@@ -206,7 +190,7 @@ var toFormat = (value) => {
206
190
  };
207
191
 
208
192
  // src/components/Form/index.tsx
209
- var import_classnames4 = __toESM(require("classnames"));
193
+ var import_classnames3 = __toESM(require("classnames"));
210
194
  var import_zod2 = require("@hookform/resolvers/zod");
211
195
  var import_react_hook_form = require("react-hook-form");
212
196
  var import_lucide_react = require("lucide-react");
@@ -239,26 +223,8 @@ var BenefitsWithDocument = async ({ document, products }) => {
239
223
  return dataResponse;
240
224
  };
241
225
 
242
- // src/components/UI/Button/index.tsx
243
- var import_classnames3 = __toESM(require("classnames"));
244
- var import_jsx_runtime4 = require("react/jsx-runtime");
245
- function Button(props) {
246
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
247
- "button",
248
- {
249
- ...props,
250
- className: (0, import_classnames3.default)(
251
- "w-3xs cursor-pointer h-10 rounded-lg bg-emerald-500 hover:bg-emerald-400 text-white text-sm font-semibold transition-colors",
252
- props.className
253
- ),
254
- children: props.children
255
- }
256
- );
257
- }
258
- var Button_default = Button;
259
-
260
226
  // src/components/Form/index.tsx
261
- var import_jsx_runtime5 = require("react/jsx-runtime");
227
+ var import_jsx_runtime4 = require("react/jsx-runtime");
262
228
  function Form({ setLoading }) {
263
229
  const { setSecurityNumber, setState, securityNumber, targetProduct, setUrlAcceptTerms, setUrlRegisterIndustry } = usePBMStore();
264
230
  const [showCoupoField, setShowCoupoField] = (0, import_react2.useState)(false);
@@ -329,126 +295,105 @@ function Form({ setLoading }) {
329
295
  }
330
296
  ;
331
297
  };
332
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
333
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
334
- "form",
335
- {
336
- onSubmit: handleSubmit(onSubmitDefault),
337
- className: (0, import_classnames4.default)(
338
- "w-full h-auto flex items-center justify-center mb-0 transition-all duration-150",
339
- { "mb-4": errors.securityNumber || errors.coupon && showCoupoField, "gap-2": showCoupoField }
298
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_jsx_runtime4.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
299
+ "form",
300
+ {
301
+ onSubmit: handleSubmit(onSubmitDefault),
302
+ className: (0, import_classnames3.default)(
303
+ "w-full h-auto flex items-center justify-center mb-0 transition-all duration-150",
304
+ { "mb-4": errors.securityNumber || errors.coupon && showCoupoField, "gap-2": showCoupoField }
305
+ ),
306
+ id: "form_security_number_pbm",
307
+ children: [
308
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
309
+ "label",
310
+ {
311
+ htmlFor: "cpf",
312
+ className: "w-4/5 h-auto flex items-start flex-col justify-center relative py-2",
313
+ id: "label_security_number_pbm",
314
+ children: [
315
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
316
+ "input",
317
+ {
318
+ type: "text",
319
+ className: (0, import_classnames3.default)(
320
+ "w-full h-10 bg-gray-100 rounded-s-lg text-sm font-semibold focus:outline focus:outline-[#339c9b] focus:bg-white text-zinc-600 placeholder:text-zinc-600 px-4 placeholder:text-sm placeholder:font-semibold",
321
+ { "outline outline-red-600": errors.securityNumber, "rounded-lg": showCoupoField }
322
+ ),
323
+ placeholder: "Digite seu CPF aqui...",
324
+ required: true,
325
+ maxLength: 14,
326
+ ...register("securityNumber", {
327
+ onChange: (e) => {
328
+ const formatted = toFormat(e.target.value);
329
+ setValue("securityNumber", formatted, {
330
+ shouldValidate: true
331
+ });
332
+ }
333
+ }),
334
+ defaultValue: securityNumber || "",
335
+ id: "input_security_number_pbm"
336
+ }
337
+ ),
338
+ errors.securityNumber && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "text-red-400 text-xs font-semibold absolute -bottom-3 left-2 text-nowrap", id: "security_number_form_error", children: errors.securityNumber.message })
339
+ ]
340
+ }
340
341
  ),
341
- id: "form_security_number_pbm",
342
- children: [
343
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
344
- "label",
345
- {
346
- htmlFor: "cpf",
347
- className: "w-4/5 h-auto flex items-start flex-col justify-center relative py-2",
348
- id: "label_security_number_pbm",
349
- children: [
350
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
351
- "input",
352
- {
353
- type: "text",
354
- className: (0, import_classnames4.default)(
355
- "w-full h-10 bg-gray-100 rounded-s-lg text-sm font-semibold focus:outline focus:outline-[#339c9b] focus:bg-white text-zinc-600 placeholder:text-zinc-600 px-4 placeholder:text-sm placeholder:font-semibold",
356
- { "outline outline-red-600": errors.securityNumber, "rounded-lg": showCoupoField }
357
- ),
358
- placeholder: "Digite seu CPF aqui...",
359
- required: true,
360
- maxLength: 14,
361
- ...register("securityNumber", {
362
- onChange: (e) => {
363
- const formatted = toFormat(e.target.value);
364
- setValue("securityNumber", formatted, {
365
- shouldValidate: true
366
- });
367
- }
368
- }),
369
- defaultValue: securityNumber || "",
370
- id: "input_security_number_pbm"
371
- }
372
- ),
373
- errors.securityNumber && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "text-red-400 text-xs font-semibold absolute -bottom-3 left-2 text-nowrap", id: "security_number_form_error", children: errors.securityNumber.message })
374
- ]
375
- }
376
- ),
377
- showCoupoField && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
378
- "label",
379
- {
380
- htmlFor: "coupon",
381
- className: "w-4/5 h-auto flex items-start flex-col justify-center relative py-2",
382
- id: "label_coupon_pbm",
383
- children: [
384
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
385
- "input",
386
- {
387
- type: "text",
388
- className: (0, import_classnames4.default)(
389
- "w-full h-10 bg-gray-100 rounded-s-lg text-sm font-semibold focus:outline focus:outline-[#339c9b] focus:bg-white text-zinc-600 placeholder:text-zinc-600 px-4 placeholder:text-sm placeholder:font-semibold",
390
- { "outline outline-red-600": errors.coupon, "rounded-lg": showCoupoField }
391
- ),
392
- placeholder: "Cupom / ID do Cart\xE3o",
393
- ...register("coupon", {
394
- required: showCoupoField ? "Cupom / ID do Cart\xE3o obrigat\xF3rio." : false,
395
- shouldUnregister: !showCoupoField,
396
- onChange: (e) => {
397
- setValue("coupon", e.target.value, {
398
- shouldValidate: showCoupoField
399
- });
400
- }
401
- }),
402
- id: "input_coupon_pbm"
403
- }
404
- ),
405
- errors.coupon && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "text-red-400 text-xs font-semibold absolute -bottom-3 left-2 text-nowrap", id: "coupon_form_error", children: errors.coupon.message })
406
- ]
407
- }
408
- ),
409
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
410
- "button",
411
- {
412
- type: "submit",
413
- className: (0, import_classnames4.default)(
414
- "bg-emerald-500 w-1/5 h-10 rounded-e-lg flex items-center justify-center cursor-pointer",
415
- { "rounded-lg": showCoupoField }
342
+ showCoupoField && /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
343
+ "label",
344
+ {
345
+ htmlFor: "coupon",
346
+ className: "w-4/5 h-auto flex items-start flex-col justify-center relative py-2",
347
+ id: "label_coupon_pbm",
348
+ children: [
349
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
350
+ "input",
351
+ {
352
+ type: "text",
353
+ className: (0, import_classnames3.default)(
354
+ "w-full h-10 bg-gray-100 rounded-s-lg text-sm font-semibold focus:outline focus:outline-[#339c9b] focus:bg-white text-zinc-600 placeholder:text-zinc-600 px-4 placeholder:text-sm placeholder:font-semibold",
355
+ { "outline outline-red-600": errors.coupon, "rounded-lg": showCoupoField }
356
+ ),
357
+ placeholder: "Cupom / ID do Cart\xE3o",
358
+ ...register("coupon", {
359
+ required: showCoupoField ? "Cupom / ID do Cart\xE3o obrigat\xF3rio." : false,
360
+ shouldUnregister: !showCoupoField,
361
+ onChange: (e) => {
362
+ setValue("coupon", e.target.value, {
363
+ shouldValidate: showCoupoField
364
+ });
365
+ }
366
+ }),
367
+ id: "input_coupon_pbm"
368
+ }
416
369
  ),
417
- id: "button_submit_security_number_pbm",
418
- children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_lucide_react.ArrowRight, { size: 24, color: "white", strokeWidth: 2 })
419
- }
420
- )
421
- ]
422
- }
423
- ),
424
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
425
- Button_default,
426
- {
427
- className: "bg-transparent p-0 pl-2 w-auto h-auto text-zinc-600 underline cursor-pointer hover:text-zinc-900 hover:bg-transparent flex items-center justify-start gap-1",
428
- onClick: () => {
429
- const newValue = !showCoupoField;
430
- setShowCoupoField(newValue);
431
- if (!newValue) {
432
- unregister("coupon");
433
- clearErrors("coupon");
370
+ errors.coupon && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "text-red-400 text-xs font-semibold absolute -bottom-3 left-2 text-nowrap", id: "coupon_form_error", children: errors.coupon.message })
371
+ ]
434
372
  }
435
- },
436
- id: "check_benefits_button",
437
- children: [
438
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { children: !showCoupoField ? "Possui cupom?" : "N\xE3o possui cupom?" }),
439
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_lucide_react.ArrowRight, { size: 16, className: (0, import_classnames4.default)({ "rotate-0": !showCoupoField, "rotate-180": showCoupoField }) })
440
- ]
441
- }
442
- )
443
- ] });
373
+ ),
374
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
375
+ "button",
376
+ {
377
+ type: "submit",
378
+ className: (0, import_classnames3.default)(
379
+ "bg-emerald-500 w-1/5 h-10 rounded-e-lg flex items-center justify-center cursor-pointer",
380
+ { "rounded-lg": showCoupoField }
381
+ ),
382
+ id: "button_submit_security_number_pbm",
383
+ children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_lucide_react.ArrowRight, { size: 24, color: "white", strokeWidth: 2 })
384
+ }
385
+ )
386
+ ]
387
+ }
388
+ ) });
444
389
  }
445
390
  var Form_default = Form;
446
391
 
447
392
  // src/components/UI/Loading/index.tsx
448
- var import_jsx_runtime6 = require("react/jsx-runtime");
393
+ var import_jsx_runtime5 = require("react/jsx-runtime");
449
394
  function Loading({ textColor }) {
450
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("main", { className: "flex items-center justify-center gap-4", id: "loading_pbm", children: [
451
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
395
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("main", { className: "flex items-center justify-center gap-4", id: "loading_pbm", children: [
396
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
452
397
  "div",
453
398
  {
454
399
  "data-testid": "test_id_spin",
@@ -456,7 +401,7 @@ function Loading({ textColor }) {
456
401
  id: "loading_spin"
457
402
  }
458
403
  ),
459
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
404
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
460
405
  "p",
461
406
  {
462
407
  className: "text-sm font-semibold text-start text-zinc-900",
@@ -469,6 +414,24 @@ function Loading({ textColor }) {
469
414
  }
470
415
  var Loading_default = Loading;
471
416
 
417
+ // src/components/UI/Button/index.tsx
418
+ var import_classnames4 = __toESM(require("classnames"));
419
+ var import_jsx_runtime6 = require("react/jsx-runtime");
420
+ function Button(props) {
421
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
422
+ "button",
423
+ {
424
+ ...props,
425
+ className: (0, import_classnames4.default)(
426
+ "w-3xs cursor-pointer h-10 rounded-lg bg-emerald-500 hover:bg-emerald-400 text-white text-sm font-semibold transition-colors",
427
+ props.className
428
+ ),
429
+ children: props.children
430
+ }
431
+ );
432
+ }
433
+ var Button_default = Button;
434
+
472
435
  // src/components/BenefitsTable/index.tsx
473
436
  var import_react4 = require("react");
474
437
 
@@ -493,10 +456,59 @@ function Title(props) {
493
456
  var Title_default = Title;
494
457
 
495
458
  // src/components/BenefitsTable/Item.tsx
496
- var import_lucide_react2 = require("lucide-react");
497
459
  var import_react3 = require("react");
498
460
  var import_classnames6 = __toESM(require("classnames"));
461
+
462
+ // src/components/UI/Icons/index.tsx
499
463
  var import_jsx_runtime8 = require("react/jsx-runtime");
464
+ function CheckON({ size }) {
465
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
466
+ "svg",
467
+ {
468
+ xmlns: "http://www.w3.org/2000/svg",
469
+ "data-name": "Camada 1",
470
+ viewBox: "0 0 500 500",
471
+ width: size,
472
+ height: size,
473
+ children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
474
+ "path",
475
+ {
476
+ d: "M421.44 78.56C375.64 32.77 314.76 7.55 250 7.55S124.36 32.77 78.56 78.56C32.77 124.36 7.55 185.24 7.55 250s25.22 125.64 71.01 171.44c45.8 45.79 106.68 71.01 171.44 71.01s125.64-25.22 171.44-71.01c45.79-45.8 71.01-106.68 71.01-171.44s-25.22-125.64-71.01-171.44zm-49.17 121.7L242.88 334.63c-8.98 9.29-23.57 10.17-33.59 2.02l-79.63-64.7c-10.69-8.67-12.33-24.38-3.66-35.07 8.67-10.69 24.38-12.33 35.07-3.65l61.9 50.39L336.5 165.74c4.4-4.75 10.48-7.59 16.95-7.93a24.88 24.88 0 0118.83 7.26c9.72 9.72 9.71 25.48 0 35.19z",
477
+ fill: "#229b00"
478
+ }
479
+ )
480
+ }
481
+ );
482
+ }
483
+ function CheckOFF({ size }) {
484
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
485
+ "svg",
486
+ {
487
+ xmlns: "http://www.w3.org/2000/svg",
488
+ "data-name": "Camada 1",
489
+ viewBox: "0 0 500 500",
490
+ width: size,
491
+ height: size,
492
+ children: [
493
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("circle", { cx: 250, cy: 250, r: 237.45, fill: "#fff" }),
494
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
495
+ "path",
496
+ {
497
+ d: "M250 492.45c-64.76 0-125.64-25.22-171.44-71.01C32.77 375.64 7.55 314.76 7.55 250S32.77 124.36 78.56 78.56C124.36 32.77 185.24 7.55 250 7.55s125.64 25.22 171.44 71.01c45.79 45.79 71.01 106.68 71.01 171.44s-25.22 125.64-71.01 171.44c-45.79 45.79-106.68 71.01-171.44 71.01zm0-474.9C121.83 17.55 17.55 121.83 17.55 250S121.83 482.45 250 482.45 482.45 378.17 482.45 250 378.17 17.55 250 17.55z",
498
+ fill: "#d8d8d8"
499
+ }
500
+ )
501
+ ]
502
+ }
503
+ );
504
+ }
505
+ var Icons = {
506
+ CheckON,
507
+ CheckOFF
508
+ };
509
+
510
+ // src/components/BenefitsTable/Item.tsx
511
+ var import_jsx_runtime9 = require("react/jsx-runtime");
500
512
  function Item({ data, onChange, checked }) {
501
513
  const { setAvailableDiscountSelected, state, isAuthenticatedShopper } = usePBMStore();
502
514
  const ID_INPUT = "unity_quantity_" + data.authorizedQuantity;
@@ -528,7 +540,7 @@ function Item({ data, onChange, checked }) {
528
540
  (0, import_react3.useEffect)(() => {
529
541
  updateStorageData();
530
542
  }, [updateStorageData]);
531
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
543
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
532
544
  "label",
533
545
  {
534
546
  htmlFor: ID_INPUT,
@@ -539,7 +551,7 @@ function Item({ data, onChange, checked }) {
539
551
  id: "label_benefits_" + ID_INPUT,
540
552
  title: !isAuthenticatedShopper ? "Necess\xE1rio fazer login!" : "",
541
553
  children: [
542
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
554
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
543
555
  "input",
544
556
  {
545
557
  type: "radio",
@@ -551,13 +563,13 @@ function Item({ data, onChange, checked }) {
551
563
  disabled: state === "isPreview" || !isAuthenticatedShopper
552
564
  }
553
565
  ),
554
- !checked ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react2.Badge, { color: "#9f9fa9", size: 20 }) : /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react2.BadgeCheck, { color: "#32b316", size: 20 }),
555
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { className: "text-zinc-900 font-semibold text-sm", children: [
566
+ !checked ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Icons.CheckOFF, { size: 20 }) : /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Icons.CheckON, { size: 20 }),
567
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("span", { className: "text-zinc-900 font-semibold text-sm", children: [
556
568
  data.authorizedQuantity,
557
569
  "un"
558
570
  ] }),
559
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("section", { className: "ml-auto relative gap-2 flex items-center-safe justify-end-safe", children: [
560
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { className: "text-white -top-4 py-0.5 font-semibold text-xs bg-[#32b316] px-2 w-auto text-nowrap rounded-2xl -right-3", children: [
571
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("section", { className: "ml-auto relative gap-2 flex items-center-safe justify-end-safe", children: [
572
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("span", { className: "text-white -top-4 py-0.5 font-semibold text-xs bg-[#32b316] px-2 w-auto text-nowrap rounded-2xl -right-3", children: [
561
573
  discountValue.toLocaleString("pt-BR", {
562
574
  currency: "BRL",
563
575
  currencyDisplay: "symbol",
@@ -567,7 +579,7 @@ function Item({ data, onChange, checked }) {
567
579
  " ",
568
580
  "OFF"
569
581
  ] }),
570
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("strong", { className: "text-zinc-900 font-semibold text-sm text-center", children: totalPriceProductWithDiscountBenefit.toLocaleString("pt-BR", {
582
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("strong", { className: "text-zinc-900 font-semibold text-sm text-center", children: totalPriceProductWithDiscountBenefit.toLocaleString("pt-BR", {
571
583
  currency: "BRL",
572
584
  currencyDisplay: "symbol",
573
585
  currencySign: "standard",
@@ -608,7 +620,7 @@ var CheckBenefistWithoutDocument = async ({ products }) => {
608
620
  };
609
621
 
610
622
  // src/components/BenefitsTable/index.tsx
611
- var import_jsx_runtime9 = require("react/jsx-runtime");
623
+ var import_jsx_runtime10 = require("react/jsx-runtime");
612
624
  function BenefitsTable() {
613
625
  const { securityNumber, setState, state, targetProduct, customLoginUrl, isAuthenticatedShopper } = usePBMStore();
614
626
  const [selectedDiscout, setSelectedDiscount] = (0, import_react4.useState)(null);
@@ -698,8 +710,8 @@ function BenefitsTable() {
698
710
  state === "isActivated" ? fetchDiscountWithDocument() : fetchDicountsWithoutDocument();
699
711
  }, []);
700
712
  if (loading) {
701
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("main", { className: "flex items-center justify-center gap-4", id: "loading_pbm", children: [
702
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
713
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("main", { className: "flex items-center justify-center gap-4", id: "loading_pbm", children: [
714
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
703
715
  "div",
704
716
  {
705
717
  "data-testid": "test_id_spin",
@@ -707,7 +719,7 @@ function BenefitsTable() {
707
719
  id: "loading_spin"
708
720
  }
709
721
  ),
710
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
722
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
711
723
  "p",
712
724
  {
713
725
  className: "text-sm font-semibold text-start text-zinc-900",
@@ -717,23 +729,23 @@ function BenefitsTable() {
717
729
  )
718
730
  ] });
719
731
  }
720
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
732
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
721
733
  "section",
722
734
  {
723
735
  className: "flex items-start justify-center gap-4 w-full h-auto flex-col",
724
736
  id: "benefits_table_pbm",
725
737
  children: [
726
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Title_default, { children: "Descontos dispon\xEDveis:" }),
727
- /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
738
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Title_default, { children: "Descontos dispon\xEDveis:" }),
739
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
728
740
  "form",
729
741
  {
730
742
  className: "flex flex-col items-center justify-start w-full gap-4.5",
731
743
  id: "form_benefits_table_pbm",
732
744
  children: [
733
- !benefitsItems && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("p", { className: "text-sm font-semibold text-start text-zinc-900", id: "benefits_empty_pbm", children: "N\xE3o foi poss\xEDvel encontrar benef\xEDcios para esse produto." }),
745
+ !benefitsItems && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("p", { className: "text-sm font-semibold text-start text-zinc-900", id: "benefits_empty_pbm", children: "N\xE3o foi poss\xEDvel encontrar benef\xEDcios para esse produto." }),
734
746
  benefitsItems && benefitsItems.map((item, index) => {
735
747
  const ID_INPUT = "unity_quantity_" + item.authorizedQuantity;
736
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
748
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
737
749
  Item_default,
738
750
  {
739
751
  data: item,
@@ -742,12 +754,11 @@ function BenefitsTable() {
742
754
  },
743
755
  index
744
756
  );
745
- }),
746
- benefitsItems && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("p", { className: "w-full text-sm font-semibold text-center text-zinc-600", id: "benefits_empty_pbm", children: benefitsItems[0].informativeMessage })
757
+ })
747
758
  ]
748
759
  }
749
760
  ),
750
- state === "isPreview" && /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
761
+ state === "isPreview" && /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
751
762
  Button_default,
752
763
  {
753
764
  onClick: () => setState("isEmpty"),
@@ -756,27 +767,27 @@ function BenefitsTable() {
756
767
  children: [
757
768
  "Aten\xE7\xE3o: N\xE3o \xE9 poss\xEDvel utilizar os benef\xEDcos sem realizar a consulta do CPF e o Login, por favor",
758
769
  " ",
759
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "underline", children: "insira seu cpf para utilizar os benef\xEDcios" })
770
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "underline", children: "insira seu cpf para utilizar os benef\xEDcios" })
760
771
  ]
761
772
  }
762
773
  ),
763
- state === "isActivated" && /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_jsx_runtime9.Fragment, { children: [
764
- !isAuthenticatedShopper && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
774
+ state === "isActivated" && /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_jsx_runtime10.Fragment, { children: [
775
+ !isAuthenticatedShopper && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
765
776
  Button_default,
766
777
  {
767
778
  onClick: () => window.location.href = customLoginUrl || "/login",
768
779
  className: "bg-transparent p-0 pl-2 w-auto h-auto text-zinc-600 cursor-pointer hover:text-zinc-900 hover:bg-transparent text-start",
769
780
  id: "login",
770
- children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "underline", children: "Por favor, fa\xE7a o Login para aproveitar os benef\xEDcios!" })
781
+ children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "underline", children: "Por favor, fa\xE7a o Login para aproveitar os benef\xEDcios!" })
771
782
  }
772
783
  ),
773
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
784
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
774
785
  Button_default,
775
786
  {
776
787
  onClick: () => setState("isEmpty"),
777
788
  className: "bg-transparent p-0 pl-2 w-auto h-auto text-zinc-600 cursor-pointer hover:text-zinc-900 hover:bg-transparent text-start",
778
789
  id: "change_security_number",
779
- children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "underline", children: "Deseja editar o cpf digitado?" })
790
+ children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "underline", children: "Deseja editar o cpf digitado?" })
780
791
  }
781
792
  )
782
793
  ] })
@@ -788,9 +799,9 @@ var BenefitsTable_default = BenefitsTable;
788
799
 
789
800
  // src/components/UI/Text/index.tsx
790
801
  var import_classnames7 = __toESM(require("classnames"));
791
- var import_jsx_runtime10 = require("react/jsx-runtime");
802
+ var import_jsx_runtime11 = require("react/jsx-runtime");
792
803
  function Text(props) {
793
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
804
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
794
805
  "p",
795
806
  {
796
807
  className: (0, import_classnames7.default)(
@@ -817,10 +828,10 @@ var getParams = (params) => {
817
828
  };
818
829
 
819
830
  // src/components/UI/Link/index.tsx
820
- var import_jsx_runtime11 = require("react/jsx-runtime");
831
+ var import_jsx_runtime12 = require("react/jsx-runtime");
821
832
  function Link(props) {
822
833
  const { setState } = usePBMStore();
823
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
834
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
824
835
  "a",
825
836
  {
826
837
  ...props,
@@ -840,23 +851,23 @@ function Link(props) {
840
851
  var Link_default = Link;
841
852
 
842
853
  // src/components/SecurityNumberInvalid/index.tsx
843
- var import_jsx_runtime12 = require("react/jsx-runtime");
854
+ var import_jsx_runtime13 = require("react/jsx-runtime");
844
855
  function SecurityNumberInvalid({ textColor }) {
845
856
  const { urlAcceptTerms } = usePBMStore();
846
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
857
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
847
858
  "section",
848
859
  {
849
860
  "data-testid": "test_id_invalid",
850
861
  className: "flex items-end justify-center gap-2 w-full h-auto flex-col border-y border-zinc-300 py-6",
851
862
  id: "security_number_invalid_container_pbm",
852
863
  children: [
853
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Title_default, { className: "w-full", textColor, children: "CPF n\xE3o cadastrado." }),
854
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(Text_default, { className: "w-full", textColor, children: [
864
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Title_default, { className: "w-full", textColor, children: "CPF n\xE3o cadastrado." }),
865
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(Text_default, { className: "w-full", textColor, children: [
855
866
  "Conclua seu cadastro para habilitar o benef\xEDcio. ",
856
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("br", {}),
867
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("br", {}),
857
868
  "Ao clicar em \u201CAceitar os termos\u201D, voc\xEA ir\xE1 para uma p\xE1gina externa. Aceite os termos e volte para continuar."
858
869
  ] }),
859
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
870
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
860
871
  Link_default,
861
872
  {
862
873
  href: urlAcceptTerms || "",
@@ -873,19 +884,19 @@ var SecurityNumberInvalid_default = SecurityNumberInvalid;
873
884
  var import_react5 = require("react");
874
885
 
875
886
  // src/components/SecurityNumberRegitered/index.tsx
876
- var import_jsx_runtime13 = require("react/jsx-runtime");
887
+ var import_jsx_runtime14 = require("react/jsx-runtime");
877
888
  function SecurityNumberRegitered({ textColor }) {
878
889
  const { urlRegisterIndustry } = usePBMStore();
879
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
890
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
880
891
  "section",
881
892
  {
882
893
  "data-testid": "test_id_registered",
883
894
  className: "flex items-end justify-center gap-2 w-full h-auto flex-col border-y border-zinc-300 py-6",
884
895
  id: "security_number_registered_container_pbm",
885
896
  children: [
886
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Title_default, { className: "w-full", textColor, children: "Ops, seu CPF ainda n\xE3o est\xE1 habilitado para este produto." }),
887
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Text_default, { className: "w-full", textColor, children: "Para ativar o benef\xEDcio, clique em \u201CAtivar CPF\u201D e conclua a etapa na p\xE1gina externa. Depois, \xE9 s\xF3 voltar para continuar \u2014 vamos aguardar voc\xEA aqui." }),
888
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
897
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Title_default, { className: "w-full", textColor, children: "Ops, seu CPF ainda n\xE3o est\xE1 habilitado para este produto." }),
898
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Text_default, { className: "w-full", textColor, children: "Para ativar o benef\xEDcio, clique em \u201CAtivar CPF\u201D e conclua a etapa na p\xE1gina externa. Depois, \xE9 s\xF3 voltar para continuar \u2014 vamos aguardar voc\xEA aqui." }),
899
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
889
900
  Link_default,
890
901
  {
891
902
  href: urlRegisterIndustry || "",
@@ -930,7 +941,7 @@ var GetAuthorization = async ({ clientID }) => {
930
941
  };
931
942
 
932
943
  // src/PBM.tsx
933
- var import_lucide_react3 = require("lucide-react");
944
+ var import_lucide_react2 = require("lucide-react");
934
945
 
935
946
  // src/services/get-product-by-ean.ts
936
947
  var import_js_cookie4 = __toESM(require("js-cookie"));
@@ -956,7 +967,8 @@ var GetProductByEAN = async ({ PRODUCT_EAN }) => {
956
967
  };
957
968
 
958
969
  // src/PBM.tsx
959
- var import_jsx_runtime14 = require("react/jsx-runtime");
970
+ var import_Skeleton = __toESM(require("@mui/material/Skeleton"));
971
+ var import_jsx_runtime15 = require("react/jsx-runtime");
960
972
  function PBM({
961
973
  originalProductPrice,
962
974
  clientID,
@@ -997,6 +1009,7 @@ function PBM({
997
1009
  } catch (error) {
998
1010
  console.error(error);
999
1011
  } finally {
1012
+ setIsReady(true);
1000
1013
  }
1001
1014
  };
1002
1015
  const handleAuthorizationRequest = (0, import_react5.useCallback)(async () => {
@@ -1015,54 +1028,54 @@ function PBM({
1015
1028
  handleAuthorizationRequest();
1016
1029
  }, [handleAuthorizationRequest]);
1017
1030
  if (!isReady) {
1018
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "rounded-xl w-[556px] h-[358px] bg-zinc-500/20 \n shadow-[0_0_15px_rgba(0,0,0,0.1)] \n hover:shadow-[0_0_30px_rgba(0,0,0,0.3)] \n transition-all duration-500 ease-in-out" });
1031
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_Skeleton.default, { variant: "rectangular", style: { borderRadius: "12px" }, width: 460, height: 358 });
1019
1032
  }
1020
1033
  if (!EanProductExist) {
1021
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { id: "pbm-library-root", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(Container_default, { variant: "main", children: [
1022
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Title_default, { children: "Erro ao Aplicar o Benef\xEDcio" }),
1023
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(Text_default, { textAlign: "center", children: [
1034
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { id: "pbm-library-root", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(Container_default, { variant: "main", children: [
1035
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Title_default, { children: "Erro ao Aplicar o Benef\xEDcio" }),
1036
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(Text_default, { textAlign: "center", children: [
1024
1037
  "O produto n\xE3o foi encontrado no sistema. ",
1025
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("br", {}),
1038
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("br", {}),
1026
1039
  " Por favor, tente novamente mais tarde ou contate o suporte."
1027
1040
  ] }),
1028
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
1041
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
1029
1042
  Button_default,
1030
1043
  {
1031
1044
  className: "bg-transparent p-0 pl-2 w-auto h-auto text-zinc-600 underline cursor-pointer hover:text-zinc-900 hover:bg-transparent flex items-center justify-start gap-1",
1032
1045
  onClick: () => window.location.reload(),
1033
1046
  id: "check_benefits_button",
1034
1047
  children: [
1035
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { children: "Tentar novamente" }),
1036
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react3.RefreshCw, { size: 16 })
1048
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { children: "Tentar novamente" }),
1049
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react2.RefreshCw, { size: 16 })
1037
1050
  ]
1038
1051
  }
1039
1052
  )
1040
1053
  ] }) });
1041
1054
  }
1042
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { id: "pbm-library-root", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(Container_default, { variant: "main", children: [
1043
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Header_default, { originalProductPrice: formatedOriginalProductPrice || 0 }),
1044
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(Container_default, { variant: "simple", children: [
1045
- state === "isEmpty" && !loading && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_jsx_runtime14.Fragment, { children: [
1046
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Form_default, { setLoading }),
1047
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
1055
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { id: "pbm-library-root", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(Container_default, { variant: "main", children: [
1056
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Header_default, { originalProductPrice: formatedOriginalProductPrice || 0 }),
1057
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(Container_default, { variant: "simple", children: [
1058
+ state === "isEmpty" && !loading && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_jsx_runtime15.Fragment, { children: [
1059
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Form_default, { setLoading }),
1060
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
1048
1061
  Button_default,
1049
1062
  {
1050
1063
  className: "bg-transparent p-0 pl-2 w-auto h-auto text-zinc-600 underline cursor-pointer hover:text-zinc-900 hover:bg-transparent flex items-center justify-start gap-1",
1051
1064
  onClick: () => setState("isPreview"),
1052
1065
  id: "check_benefits_button",
1053
1066
  children: [
1054
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { children: "Consultar benef\xEDcios" }),
1055
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react3.ArrowRight, { size: 16 })
1067
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { children: "Consultar benef\xEDcios" }),
1068
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react2.ArrowRight, { size: 16 })
1056
1069
  ]
1057
1070
  }
1058
1071
  )
1059
1072
  ] }),
1060
- state === "isEmpty" && loading && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Loading_default, {}),
1061
- state === "isInvalid" && !loading && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(SecurityNumberInvalid_default, {}),
1062
- state === "isRegistered" && !loading && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(SecurityNumberRegitered_default, {}),
1063
- (state === "isActivated" || state === "isPreview") && !loading && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(BenefitsTable_default, {})
1073
+ state === "isEmpty" && loading && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Loading_default, {}),
1074
+ state === "isInvalid" && !loading && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(SecurityNumberInvalid_default, {}),
1075
+ state === "isRegistered" && !loading && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(SecurityNumberRegitered_default, {}),
1076
+ (state === "isActivated" || state === "isPreview") && !loading && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(BenefitsTable_default, {})
1064
1077
  ] }),
1065
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Footer_default, {})
1078
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Footer_default, {})
1066
1079
  ] }) });
1067
1080
  }
1068
1081
  var PBM_default = PBM;