const { Button } = VM.require("beachsunandrockandroll.near/widget/button"); const { AlertDialogRoot, AlertDialogOverlay, AlertDialogTrigger, AlertDialogContent, AlertDialogHeader, AlertDialogFooter, AlertDialogTitle, AlertDialogDescription, AlertDialogAction, AlertDialogCancel, } = VM.require("beachsunandrockandroll.near/widget/alertDialog"); State.init({ cnOverlay: "", cnButton: "", cnCancelButton: "", cnActionButton: "", cnDescription: "", cnTitle: "", cnFooter: "", cnHeader: "", cnContent: "", cnOverlay: "", }); return ( <> <Widget src="beachsunandrockandroll.near/widget/cnIframe" props={{ output: (cnOverlay) => State.update({ cnOverlay }), className: "text-black", }} /> <Widget src="beachsunandrockandroll.near/widget/buttonIframe" props={{ output: (cnButton) => State.update({ cnButton }), variant: "outline", }} /> <Widget src="beachsunandrockandroll.near/widget/buttonIframe" props={{ output: (cnCancelButton) => State.update({ cnCancelButton }), variant: "outline", className: "mt-2 sm:mt-0", }} /> <Widget src="beachsunandrockandroll.near/widget/buttonIframe" props={{ output: (cnActionButton) => State.update({ cnActionButton }), }} /> <Widget src="beachsunandrockandroll.near/widget/cnIframe" props={{ output: (cnDescription) => State.update({ cnDescription }), className: "text-sm text-muted-foreground", }} /> <Widget src="beachsunandrockandroll.near/widget/cnIframe" props={{ output: (cnTitle) => State.update({ cnTitle }), className: "text-lg font-semibold", }} /> <Widget src="beachsunandrockandroll.near/widget/cnIframe" props={{ output: (cnFooter) => State.update({ cnFooter }), className: "flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", }} /> <Widget src="beachsunandrockandroll.near/widget/cnIframe" props={{ output: (cnHeader) => State.update({ cnHeader }), className: "flex flex-col space-y-2 text-center sm:text-left", }} /> <Widget src="beachsunandrockandroll.near/widget/cnIframe" props={{ output: (cnOverlay) => State.update({ cnOverlay }), className: "fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0", }} /> <Widget src="beachsunandrockandroll.near/widget/cnIframe" props={{ output: (cnContent) => State.update({ cnContent }), className: "fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg", }} /> <AlertDialogRoot> <AlertDialogTrigger> <Button className={state.cnButton}>Show Dialog</Button> </AlertDialogTrigger> <AlertDialogContent className={state.cnContent} classNameOverlay={state.cnOverlay} > <AlertDialogHeader className={state.cnHeader}> <AlertDialogTitle className={state.cnTitle}> Are you absolutely sure? </AlertDialogTitle> <AlertDialogDescription className={state.cnDescription}> This action cannot be undone. This will permanently delete your account and remove your data from our servers. </AlertDialogDescription> </AlertDialogHeader> <AlertDialogFooter className={state.cnFooter}> <AlertDialogCancel className={state.cnCancelButton}> Cancel </AlertDialogCancel> <AlertDialogAction className={state.cnActionButton}> Continue </AlertDialogAction> </AlertDialogFooter> </AlertDialogContent> </AlertDialogRoot> </> );