@sikka/hawa 0.49.7-next → 0.49.9-next
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/blocks/auth/index.d.mts +1 -0
- package/dist/blocks/auth/index.d.ts +1 -0
- package/dist/blocks/auth/index.js +102 -96
- package/dist/blocks/auth/index.mjs +102 -96
- package/dist/blocks/index.d.mts +1 -0
- package/dist/blocks/index.d.ts +1 -0
- package/dist/blocks/index.js +102 -96
- package/dist/blocks/index.mjs +102 -96
- package/dist/index.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +102 -96
- package/dist/index.mjs +102 -96
- package/package.json +1 -1
@@ -4298,8 +4298,15 @@ var RegisterForm = ({
|
|
4298
4298
|
continueWithEmail: texts == null ? void 0 : texts.continueWithEmail,
|
4299
4299
|
continueWithPhone: texts == null ? void 0 : texts.continueWithPhone
|
4300
4300
|
};
|
4301
|
-
const methods = (0, import_react_hook_form2.useForm)();
|
4302
4301
|
let fieldSchemas = {};
|
4302
|
+
let remainingFieldsSchema = z2.object({
|
4303
|
+
refCode: z2.string().optional(),
|
4304
|
+
reference: z2.string().optional(),
|
4305
|
+
terms_accepted: showTermsOption ? z2.boolean({ required_error: (texts == null ? void 0 : texts.termsRequired) || "Terms required" }).refine((value) => value, {
|
4306
|
+
message: (texts == null ? void 0 : texts.termsRequired) || "Terms required"
|
4307
|
+
}) : z2.boolean().optional(),
|
4308
|
+
newsletter_accepted: z2.boolean().optional()
|
4309
|
+
});
|
4303
4310
|
const hasPhoneType = registerTypes == null ? void 0 : registerTypes.some((type) => type.value === "phone");
|
4304
4311
|
if (hasPhoneType && selectedRegisterType.value === "phone") {
|
4305
4312
|
registerFields = ["phone"];
|
@@ -4354,13 +4361,7 @@ var RegisterForm = ({
|
|
4354
4361
|
return isPhoneValid;
|
4355
4362
|
},
|
4356
4363
|
{ message: ((_d = texts == null ? void 0 : texts.phone) == null ? void 0 : _d.invalid) || "Phone Number Invalid" }
|
4357
|
-
)
|
4358
|
-
refCode: z2.string().optional(),
|
4359
|
-
reference: z2.string().optional(),
|
4360
|
-
terms_accepted: z2.boolean({ required_error: (texts == null ? void 0 : texts.termsRequired) || "Terms required" }).refine((value) => value, {
|
4361
|
-
message: (texts == null ? void 0 : texts.termsRequired) || "Terms required"
|
4362
|
-
}),
|
4363
|
-
newsletter_accepted: z2.boolean().optional()
|
4364
|
+
)
|
4364
4365
|
});
|
4365
4366
|
} else {
|
4366
4367
|
formSchema = z2.object({
|
@@ -4378,21 +4379,24 @@ var RegisterForm = ({
|
|
4378
4379
|
message: ((_i = texts == null ? void 0 : texts.password) == null ? void 0 : _i.tooShort) || "Password is too short"
|
4379
4380
|
}).refine((value) => value !== "", {
|
4380
4381
|
message: ((_j = texts == null ? void 0 : texts.password) == null ? void 0 : _j.required) || "Confirm password is required"
|
4381
|
-
})
|
4382
|
-
refCode: z2.string().optional(),
|
4383
|
-
reference: z2.string().optional(),
|
4384
|
-
terms_accepted: z2.boolean({ required_error: (texts == null ? void 0 : texts.termsRequired) || "Terms required" }).refine((value) => value, {
|
4385
|
-
message: (texts == null ? void 0 : texts.termsRequired) || "Terms required"
|
4386
|
-
}),
|
4387
|
-
newsletter_accepted: z2.boolean().optional()
|
4382
|
+
})
|
4388
4383
|
}).refine((data) => data.password === data.confirm_password, {
|
4389
4384
|
message: ((_k = texts == null ? void 0 : texts.confirm) == null ? void 0 : _k.dontMatch) || "Passwords don't match",
|
4390
4385
|
path: ["confirm_password"]
|
4391
4386
|
});
|
4392
4387
|
}
|
4393
|
-
|
4394
|
-
|
4388
|
+
let finalSchema = z2.intersection(formSchema, remainingFieldsSchema);
|
4389
|
+
const methods = (0, import_react_hook_form2.useForm)({
|
4390
|
+
resolver: (0, import_zod2.zodResolver)(finalSchema)
|
4395
4391
|
});
|
4392
|
+
const onSubmit = (data) => {
|
4393
|
+
console.log("Form submitted with data:", data);
|
4394
|
+
if (props.onRegister) {
|
4395
|
+
props.onRegister(data);
|
4396
|
+
} else {
|
4397
|
+
console.log("onRegister prop is missing");
|
4398
|
+
}
|
4399
|
+
};
|
4396
4400
|
return /* @__PURE__ */ import_react37.default.createElement("div", { className: cn("hawa-flex hawa-flex-col", (_l = props.classNames) == null ? void 0 : _l.root) }, /* @__PURE__ */ import_react37.default.createElement(
|
4397
4401
|
Card,
|
4398
4402
|
{
|
@@ -4432,13 +4436,7 @@ var RegisterForm = ({
|
|
4432
4436
|
{
|
4433
4437
|
id: "register_form",
|
4434
4438
|
noValidate: true,
|
4435
|
-
onSubmit: handleSubmit(
|
4436
|
-
if (props.onRegister) {
|
4437
|
-
return props.onRegister(e);
|
4438
|
-
} else {
|
4439
|
-
console.log("Form is submitted but onRegister prop is missing");
|
4440
|
-
}
|
4441
|
-
}),
|
4439
|
+
onSubmit: methods.handleSubmit(onSubmit),
|
4442
4440
|
className: "hawa-flex hawa-flex-col hawa-gap-4"
|
4443
4441
|
},
|
4444
4442
|
/* @__PURE__ */ import_react37.default.createElement(
|
@@ -4475,7 +4473,7 @@ var RegisterForm = ({
|
|
4475
4473
|
import_react_hook_form2.Controller,
|
4476
4474
|
{
|
4477
4475
|
key: i,
|
4478
|
-
control,
|
4476
|
+
control: methods.control,
|
4479
4477
|
name: "fullName",
|
4480
4478
|
render: ({ field }) => {
|
4481
4479
|
var _a2, _b2, _c2;
|
@@ -4485,7 +4483,7 @@ var RegisterForm = ({
|
|
4485
4483
|
width: "full",
|
4486
4484
|
label: ((_a2 = texts == null ? void 0 : texts.fullName) == null ? void 0 : _a2.label) || "Full Name",
|
4487
4485
|
placeholder: (_b2 = texts == null ? void 0 : texts.fullName) == null ? void 0 : _b2.placeholder,
|
4488
|
-
helperText: (_c2 = formState.errors.fullName) == null ? void 0 : _c2.message,
|
4486
|
+
helperText: (_c2 = methods.formState.errors.fullName) == null ? void 0 : _c2.message,
|
4489
4487
|
...field
|
4490
4488
|
}
|
4491
4489
|
);
|
@@ -4498,7 +4496,7 @@ var RegisterForm = ({
|
|
4498
4496
|
import_react_hook_form2.Controller,
|
4499
4497
|
{
|
4500
4498
|
key: i,
|
4501
|
-
control,
|
4499
|
+
control: methods.control,
|
4502
4500
|
name: "email",
|
4503
4501
|
render: ({ field }) => {
|
4504
4502
|
var _a2, _b2, _c2;
|
@@ -4512,7 +4510,7 @@ var RegisterForm = ({
|
|
4512
4510
|
width: "full",
|
4513
4511
|
autoComplete: "email",
|
4514
4512
|
label: ((_a2 = texts == null ? void 0 : texts.email) == null ? void 0 : _a2.label) || "Email",
|
4515
|
-
helperText: (_b2 = formState.errors.email) == null ? void 0 : _b2.message,
|
4513
|
+
helperText: (_b2 = methods.formState.errors.email) == null ? void 0 : _b2.message,
|
4516
4514
|
placeholder: ((_c2 = texts == null ? void 0 : texts.email) == null ? void 0 : _c2.placeholder) || "Enter your email",
|
4517
4515
|
...field,
|
4518
4516
|
onChange: (e) => {
|
@@ -4529,7 +4527,7 @@ var RegisterForm = ({
|
|
4529
4527
|
import_react_hook_form2.Controller,
|
4530
4528
|
{
|
4531
4529
|
key: i,
|
4532
|
-
control,
|
4530
|
+
control: methods.control,
|
4533
4531
|
name: "username",
|
4534
4532
|
render: ({ field }) => {
|
4535
4533
|
var _a2, _b2, _c2, _d2, _e2;
|
@@ -4542,7 +4540,7 @@ var RegisterForm = ({
|
|
4542
4540
|
labelProps: ((_b2 = props.usernameOptions) == null ? void 0 : _b2.label) ? {
|
4543
4541
|
...(_c2 = props.usernameOptions) == null ? void 0 : _c2.label
|
4544
4542
|
} : void 0,
|
4545
|
-
helperText: (_d2 = formState.errors.username) == null ? void 0 : _d2.message,
|
4543
|
+
helperText: (_d2 = methods.formState.errors.username) == null ? void 0 : _d2.message,
|
4546
4544
|
placeholder: (_e2 = texts == null ? void 0 : texts.username) == null ? void 0 : _e2.placeholder,
|
4547
4545
|
...field
|
4548
4546
|
}
|
@@ -4555,7 +4553,7 @@ var RegisterForm = ({
|
|
4555
4553
|
/* @__PURE__ */ import_react37.default.createElement(
|
4556
4554
|
import_react_hook_form2.Controller,
|
4557
4555
|
{
|
4558
|
-
control,
|
4556
|
+
control: methods.control,
|
4559
4557
|
name: "password",
|
4560
4558
|
render: ({ field }) => {
|
4561
4559
|
var _a2, _b2, _c2;
|
@@ -4567,7 +4565,7 @@ var RegisterForm = ({
|
|
4567
4565
|
autoComplete: "new-password",
|
4568
4566
|
label: ((_a2 = texts == null ? void 0 : texts.password) == null ? void 0 : _a2.label) || "Password",
|
4569
4567
|
placeholder: (_b2 = texts == null ? void 0 : texts.password) == null ? void 0 : _b2.placeholder,
|
4570
|
-
helperText: (_c2 = formState.errors.password) == null ? void 0 : _c2.message,
|
4568
|
+
helperText: (_c2 = methods.formState.errors.password) == null ? void 0 : _c2.message,
|
4571
4569
|
endIcon: /* @__PURE__ */ import_react37.default.createElement(
|
4572
4570
|
"div",
|
4573
4571
|
{
|
@@ -4586,7 +4584,7 @@ var RegisterForm = ({
|
|
4586
4584
|
/* @__PURE__ */ import_react37.default.createElement(
|
4587
4585
|
import_react_hook_form2.Controller,
|
4588
4586
|
{
|
4589
|
-
control,
|
4587
|
+
control: methods.control,
|
4590
4588
|
name: "confirm_password",
|
4591
4589
|
render: ({ field }) => {
|
4592
4590
|
var _a2, _b2, _c2;
|
@@ -4598,7 +4596,7 @@ var RegisterForm = ({
|
|
4598
4596
|
autoComplete: "new-password",
|
4599
4597
|
label: ((_a2 = texts == null ? void 0 : texts.confirm) == null ? void 0 : _a2.label) || "Confirm Password",
|
4600
4598
|
placeholder: ((_b2 = texts == null ? void 0 : texts.confirm) == null ? void 0 : _b2.placeholder) || "Confirm your Password",
|
4601
|
-
helperText: (_c2 = formState.errors.confirm_password) == null ? void 0 : _c2.message,
|
4599
|
+
helperText: (_c2 = methods.formState.errors.confirm_password) == null ? void 0 : _c2.message,
|
4602
4600
|
endIcon: /* @__PURE__ */ import_react37.default.createElement(
|
4603
4601
|
"div",
|
4604
4602
|
{
|
@@ -4618,7 +4616,7 @@ var RegisterForm = ({
|
|
4618
4616
|
props.showRefCode && /* @__PURE__ */ import_react37.default.createElement(
|
4619
4617
|
import_react_hook_form2.Controller,
|
4620
4618
|
{
|
4621
|
-
control,
|
4619
|
+
control: methods.control,
|
4622
4620
|
name: "refCode",
|
4623
4621
|
render: ({ field }) => {
|
4624
4622
|
var _a2;
|
@@ -4628,7 +4626,7 @@ var RegisterForm = ({
|
|
4628
4626
|
width: "full",
|
4629
4627
|
label: texts == null ? void 0 : texts.refCode,
|
4630
4628
|
placeholder: (texts == null ? void 0 : texts.refCodePlaceholder) || "Enter the referral code",
|
4631
|
-
helperText: (_a2 = formState.errors.refCode) == null ? void 0 : _a2.message,
|
4629
|
+
helperText: (_a2 = methods.formState.errors.refCode) == null ? void 0 : _a2.message,
|
4632
4630
|
...field
|
4633
4631
|
}
|
4634
4632
|
);
|
@@ -4638,7 +4636,7 @@ var RegisterForm = ({
|
|
4638
4636
|
props.showUserSource && /* @__PURE__ */ import_react37.default.createElement(
|
4639
4637
|
import_react_hook_form2.Controller,
|
4640
4638
|
{
|
4641
|
-
control,
|
4639
|
+
control: methods.control,
|
4642
4640
|
name: "reference",
|
4643
4641
|
render: ({ field }) => {
|
4644
4642
|
var _a2, _b2;
|
@@ -4672,7 +4670,7 @@ var RegisterForm = ({
|
|
4672
4670
|
/* @__PURE__ */ import_react37.default.createElement(
|
4673
4671
|
import_react_hook_form2.Controller,
|
4674
4672
|
{
|
4675
|
-
control,
|
4673
|
+
control: methods.control,
|
4676
4674
|
name: "phone",
|
4677
4675
|
render: ({ field }) => {
|
4678
4676
|
var _a2, _b2;
|
@@ -4680,7 +4678,7 @@ var RegisterForm = ({
|
|
4680
4678
|
PhoneInput,
|
4681
4679
|
{
|
4682
4680
|
label: ((_a2 = texts == null ? void 0 : texts.phone) == null ? void 0 : _a2.label) || "Phone Number",
|
4683
|
-
helperText: (_b2 = formState.errors.phone) == null ? void 0 : _b2.message,
|
4681
|
+
helperText: (_b2 = methods.formState.errors.phone) == null ? void 0 : _b2.message,
|
4684
4682
|
preferredCountry: { label: "+966" },
|
4685
4683
|
...props.phoneInputProps,
|
4686
4684
|
handleChange: (e) => {
|
@@ -4700,7 +4698,7 @@ var RegisterForm = ({
|
|
4700
4698
|
props.showRefCode && /* @__PURE__ */ import_react37.default.createElement(
|
4701
4699
|
import_react_hook_form2.Controller,
|
4702
4700
|
{
|
4703
|
-
control,
|
4701
|
+
control: methods.control,
|
4704
4702
|
name: "refCode",
|
4705
4703
|
render: ({ field }) => {
|
4706
4704
|
var _a2;
|
@@ -4710,7 +4708,7 @@ var RegisterForm = ({
|
|
4710
4708
|
width: "full",
|
4711
4709
|
label: texts == null ? void 0 : texts.refCode,
|
4712
4710
|
placeholder: (texts == null ? void 0 : texts.refCodePlaceholder) || "Enter the referral code",
|
4713
|
-
helperText: (_a2 = formState.errors.refCode) == null ? void 0 : _a2.message,
|
4711
|
+
helperText: (_a2 = methods.formState.errors.refCode) == null ? void 0 : _a2.message,
|
4714
4712
|
...field
|
4715
4713
|
}
|
4716
4714
|
);
|
@@ -4720,7 +4718,7 @@ var RegisterForm = ({
|
|
4720
4718
|
props.showUserSource && /* @__PURE__ */ import_react37.default.createElement(
|
4721
4719
|
import_react_hook_form2.Controller,
|
4722
4720
|
{
|
4723
|
-
control,
|
4721
|
+
control: methods.control,
|
4724
4722
|
name: "reference",
|
4725
4723
|
render: ({ field }) => {
|
4726
4724
|
var _a2, _b2;
|
@@ -4744,7 +4742,7 @@ var RegisterForm = ({
|
|
4744
4742
|
showTermsOption || showNewsletterOption ? /* @__PURE__ */ import_react37.default.createElement("div", { className: "hawa-flex hawa-flex-col hawa-gap-3 hawa-mb-2" }, showTermsOption && /* @__PURE__ */ import_react37.default.createElement(
|
4745
4743
|
import_react_hook_form2.Controller,
|
4746
4744
|
{
|
4747
|
-
control,
|
4745
|
+
control: methods.control,
|
4748
4746
|
name: "terms_accepted",
|
4749
4747
|
render: ({ field }) => {
|
4750
4748
|
var _a2, _b2;
|
@@ -4752,7 +4750,7 @@ var RegisterForm = ({
|
|
4752
4750
|
Checkbox,
|
4753
4751
|
{
|
4754
4752
|
id: "terms_accepted",
|
4755
|
-
helperText: (_b2 = (_a2 = formState.errors.terms_accepted) == null ? void 0 : _a2.message) == null ? void 0 : _b2.toString(),
|
4753
|
+
helperText: (_b2 = (_a2 = methods.formState.errors.terms_accepted) == null ? void 0 : _a2.message) == null ? void 0 : _b2.toString(),
|
4756
4754
|
onCheckedChange: (e) => field.onChange(e),
|
4757
4755
|
label: /* @__PURE__ */ import_react37.default.createElement("div", { className: "hawa-flex hawa-flex-row hawa-gap-0.5 hawa-whitespace-nowrap hawa-flex-wrap" }, (texts == null ? void 0 : texts.iAcceptText) || "I accept the", " ", /* @__PURE__ */ import_react37.default.createElement(StopPropagationWrapper, null, /* @__PURE__ */ import_react37.default.createElement(
|
4758
4756
|
"span",
|
@@ -4774,7 +4772,7 @@ var RegisterForm = ({
|
|
4774
4772
|
), showNewsletterOption && /* @__PURE__ */ import_react37.default.createElement(
|
4775
4773
|
import_react_hook_form2.Controller,
|
4776
4774
|
{
|
4777
|
-
control,
|
4775
|
+
control: methods.control,
|
4778
4776
|
name: "newsletter_accepted",
|
4779
4777
|
render: ({ field }) => /* @__PURE__ */ import_react37.default.createElement(
|
4780
4778
|
Checkbox,
|
@@ -5214,63 +5212,71 @@ var CodeConfirmation = ({ codeLength = 6, ...props }) => {
|
|
5214
5212
|
}
|
5215
5213
|
};
|
5216
5214
|
}, []);
|
5217
|
-
return /* @__PURE__ */ import_react44.default.createElement(
|
5218
|
-
|
5215
|
+
return /* @__PURE__ */ import_react44.default.createElement(
|
5216
|
+
Card,
|
5219
5217
|
{
|
5220
|
-
|
5221
|
-
|
5222
|
-
|
5223
|
-
return props.onConfirm(e);
|
5224
|
-
} else {
|
5225
|
-
console.log("Form is submitted but onConfirm prop is missing");
|
5226
|
-
}
|
5227
|
-
})
|
5218
|
+
className: cn(
|
5219
|
+
props.cardless && "hawa-border-none hawa-bg-transparent !hawa-shadow-none !hawa-drop-shadow-none"
|
5220
|
+
)
|
5228
5221
|
},
|
5229
|
-
/* @__PURE__ */ import_react44.default.createElement(
|
5230
|
-
|
5231
|
-
{
|
5232
|
-
control,
|
5233
|
-
name: "otp_code",
|
5234
|
-
render: ({ field }) => {
|
5235
|
-
var _a2;
|
5236
|
-
return /* @__PURE__ */ import_react44.default.createElement(
|
5237
|
-
PinInput,
|
5238
|
-
{
|
5239
|
-
maxLength: codeLength,
|
5240
|
-
helperText: (_a2 = formState.errors.otp_code) == null ? void 0 : _a2.message,
|
5241
|
-
...field
|
5242
|
-
}
|
5243
|
-
);
|
5244
|
-
}
|
5245
|
-
}
|
5246
|
-
),
|
5247
|
-
showResendTimer ? /* @__PURE__ */ import_react44.default.createElement("div", { className: "hawa-py-2 hawa-text-center hawa-text-xs hawa-text-muted-foreground" }, (_e = props.texts) == null ? void 0 : _e.resendCodeTimer, " ", /* @__PURE__ */ import_react44.default.createElement("strong", null, remainingTime), " ", (_f = props.texts) == null ? void 0 : _f.seconds) : /* @__PURE__ */ import_react44.default.createElement("div", { className: "hawa-py-2 hawa-text-center hawa-text-xs hawa-text-muted-foreground" }, /* @__PURE__ */ import_react44.default.createElement("span", null, (_h = (_g = props.texts) == null ? void 0 : _g.didntGetCode) != null ? _h : "Didn't get the code?"), " ", /* @__PURE__ */ import_react44.default.createElement(
|
5248
|
-
"span",
|
5249
|
-
{
|
5250
|
-
className: "clickable-link",
|
5251
|
-
onClick: () => {
|
5252
|
-
startResendTimer();
|
5253
|
-
props.onResend();
|
5254
|
-
}
|
5255
|
-
},
|
5256
|
-
((_i = props.texts) == null ? void 0 : _i.resendCode) || "Click to resend"
|
5257
|
-
)),
|
5258
|
-
/* @__PURE__ */ import_react44.default.createElement("div", { className: "hawa-mt-4 hawa-grid hawa-grid-cols-2 hawa-gap-2" }, /* @__PURE__ */ import_react44.default.createElement(
|
5259
|
-
Button,
|
5222
|
+
/* @__PURE__ */ import_react44.default.createElement(CardContent, { headless: true, noPadding: props.cardless }, props.showError && /* @__PURE__ */ import_react44.default.createElement(Alert, { title: props.errorTitle, text: props.errorText, severity: "error" }), /* @__PURE__ */ import_react44.default.createElement("div", { className: "hawa-mb-4 dark:hawa-text-white" }, /* @__PURE__ */ import_react44.default.createElement("div", { className: "hawa-text-lg hawa-font-bold" }, ((_c = props.texts) == null ? void 0 : _c.checkYourIdentifier) || "Please check your phone"), /* @__PURE__ */ import_react44.default.createElement("div", { className: "hawa-text-muted-foreground hawa-flex hawa-flex-row" }, /* @__PURE__ */ import_react44.default.createElement("span", null, `${(_d = props.texts) == null ? void 0 : _d.weSentCode} ` || `We've sent a code to `, /* @__PURE__ */ import_react44.default.createElement("span", { dir: "ltr" }, props.identifier)))), /* @__PURE__ */ import_react44.default.createElement(
|
5223
|
+
"form",
|
5260
5224
|
{
|
5261
|
-
|
5262
|
-
|
5263
|
-
if (props.
|
5264
|
-
return props.
|
5225
|
+
noValidate: true,
|
5226
|
+
onSubmit: handleSubmit((e) => {
|
5227
|
+
if (props.onConfirm) {
|
5228
|
+
return props.onConfirm(e);
|
5265
5229
|
} else {
|
5266
|
-
console.log("
|
5230
|
+
console.log("Form is submitted but onConfirm prop is missing");
|
5267
5231
|
}
|
5268
|
-
}
|
5269
|
-
variant: "outline"
|
5232
|
+
})
|
5270
5233
|
},
|
5271
|
-
|
5272
|
-
|
5273
|
-
|
5234
|
+
/* @__PURE__ */ import_react44.default.createElement(
|
5235
|
+
import_react_hook_form5.Controller,
|
5236
|
+
{
|
5237
|
+
control,
|
5238
|
+
name: "otp_code",
|
5239
|
+
render: ({ field }) => {
|
5240
|
+
var _a2;
|
5241
|
+
return /* @__PURE__ */ import_react44.default.createElement(
|
5242
|
+
PinInput,
|
5243
|
+
{
|
5244
|
+
maxLength: codeLength,
|
5245
|
+
helperText: (_a2 = formState.errors.otp_code) == null ? void 0 : _a2.message,
|
5246
|
+
...field
|
5247
|
+
}
|
5248
|
+
);
|
5249
|
+
}
|
5250
|
+
}
|
5251
|
+
),
|
5252
|
+
showResendTimer ? /* @__PURE__ */ import_react44.default.createElement("div", { className: "hawa-py-2 hawa-text-center hawa-text-xs hawa-text-muted-foreground" }, (_e = props.texts) == null ? void 0 : _e.resendCodeTimer, " ", /* @__PURE__ */ import_react44.default.createElement("strong", null, remainingTime), " ", (_f = props.texts) == null ? void 0 : _f.seconds) : /* @__PURE__ */ import_react44.default.createElement("div", { className: "hawa-py-2 hawa-text-center hawa-text-xs hawa-text-muted-foreground" }, /* @__PURE__ */ import_react44.default.createElement("span", null, (_h = (_g = props.texts) == null ? void 0 : _g.didntGetCode) != null ? _h : "Didn't get the code?"), " ", /* @__PURE__ */ import_react44.default.createElement(
|
5253
|
+
"span",
|
5254
|
+
{
|
5255
|
+
className: "clickable-link",
|
5256
|
+
onClick: () => {
|
5257
|
+
startResendTimer();
|
5258
|
+
props.onResend();
|
5259
|
+
}
|
5260
|
+
},
|
5261
|
+
((_i = props.texts) == null ? void 0 : _i.resendCode) || "Click to resend"
|
5262
|
+
)),
|
5263
|
+
/* @__PURE__ */ import_react44.default.createElement("div", { className: "hawa-mt-4 hawa-grid hawa-grid-cols-2 hawa-gap-2" }, /* @__PURE__ */ import_react44.default.createElement(
|
5264
|
+
Button,
|
5265
|
+
{
|
5266
|
+
type: "button",
|
5267
|
+
onClick: () => {
|
5268
|
+
if (props.onCancel) {
|
5269
|
+
return props.onCancel();
|
5270
|
+
} else {
|
5271
|
+
console.log("Cancel button clicked but onCancel prop is missing");
|
5272
|
+
}
|
5273
|
+
},
|
5274
|
+
variant: "outline"
|
5275
|
+
},
|
5276
|
+
((_j = props.texts) == null ? void 0 : _j.cancel) || "Cancel"
|
5277
|
+
), /* @__PURE__ */ import_react44.default.createElement(Button, { isLoading: props.confirmLoading }, ((_k = props.texts) == null ? void 0 : _k.confirm) || "Confirm"))
|
5278
|
+
))
|
5279
|
+
);
|
5274
5280
|
};
|
5275
5281
|
// Annotate the CommonJS export names for ESM import in node:
|
5276
5282
|
0 && (module.exports = {
|