import React from 'react';
import { HelpPopoverProps } from './HelpPopover.js';
import '@bigbinary/neetoui';
type MoreOptions = {
title: string;
link: string;
path: string;
icon: React.ReactNode;
onClick?: Function;
dataTestid: string;
description?: string | React.ReactNode;
element: React.ReactNode | React.ElementType;
helpPopoverProps?: HelpPopoverProps;
};
type RegenerateConfig = {
expiresInOptions: Array<{
label: string;
value: string;
}>;
helpUrl: string;
};
/**
*
* A common component to share the link in multiple ways.
*
* 
*
* Regenerate URL enabled
*
* @example
*
* import { useRegenerateUrl } from "hooks/reactQuery/useQuizzesApi";
* import ShareViaLink from "@bigbinary/neeto-molecules/ShareViaLink";
*
* const Share = ({ quiz }) => {
* const { mutate: regenerateURL, isPending: isRegenerating } =
* useRegenerateUrl();
*
* return (
*
* );
* };
* @endexample
* Regenerate URL and Edit URL enabled
*
* @example
*
* import { useRegenerateUrl, useUpdateUrl } from "hooks/reactQuery/useQuizzesApi";
* import ShareViaLink from "@bigbinary/neeto-molecules/ShareViaLink";
*
* const Share = ({ quiz }) => {
* const { mutate: regenerateURL, isPending: isRegenerating } =
* useRegenerateUrl();
*
* const { mutate: updateUrl, isPending: isUpdating } = useUpdateUrl();
*
* return (
*
* );
* };
* @endexample
* Regenerate URL and Edit URL disabled
*
* @example
*
* import ShareViaLink from "@bigbinary/neeto-molecules/ShareViaLink";
*
* const Share = ({ quiz }) => (
*
* );
* @endexample
* With preview URL
*
* @example
*
* import ShareViaLink from "@bigbinary/neeto-molecules/ShareViaLink";
*
* const Share = ({ quiz }) => (
*
* );
* @endexample
* With more share options
*
* @example
*
* import ShareViaLink from "@bigbinary/neeto-molecules/ShareViaLink";
* import { Message, Notification } from "neetoicons";
*
* const Share = ({ quiz }) => (
* {
* alert("Notified users");
* },
* icon: Notification,
* dataTestid: "notify-users",
* description: "Users will be notified.",
* helpPopoverProps: {
* title,
* description,
* helpLinkProps: { href: HELP_DOC_URL },
* },
* },
* ]}
* />
* );
* @endexample
*/
declare const ShareViaLink: React.FC<{
title: string | React.ReactNode;
description?: string | React.ReactNode;
customTopContent?: React.ReactNode;
customBottomContent?: React.ReactNode;
isLoading?: boolean;
enabledOptions?: {
regenerate?: boolean | RegenerateConfig;
edit?: boolean;
};
entity: {
id: string;
name: string;
};
entityName: string;
handleEdit?: Function;
handleRegenerate?: Function;
socialMediaProps: {
cardTitle?: string | React.ReactNode;
cardDescription?: string | React.ReactNode;
pageTitle?: string | React.ReactNode;
pageDescription?: string | React.ReactNode;
postTitle?: string;
};
qrCodeProps: {
cardTitle?: string | React.ReactNode;
cardDescription?: string | React.ReactNode;
pageTitle?: string | React.ReactNode;
pageDescription?: string | React.ReactNode;
};
moreOptions?: MoreOptions[];
disableShareSocialMedia?: boolean;
disableQRDownload?: boolean;
urls: {
prefix?: string;
editablePath?: string;
maxLength?: number;
url: string;
previewUrl?: string;
}[];
}>;
export { ShareViaLink as default };