/** * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com). * * WSO2 LLC. licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ import { CreateOrganizationPayload } from '@asgardeo/browser'; import { FC, ReactElement } from 'react'; import { BaseCreateOrganizationProps } from './BaseCreateOrganization'; /** * Props interface for the CreateOrganization component. */ export interface CreateOrganizationProps extends Omit { /** * Fallback element to render when the user is not signed in. */ fallback?: ReactElement; /** * Custom organization creation handler (will use default API if not provided). */ onCreateOrganization?: (payload: CreateOrganizationPayload) => Promise; } /** * CreateOrganization component that provides organization creation functionality. * This component automatically integrates with the Asgardeo and Organization contexts. * * @example * ```tsx * import { CreateOrganization } from '@asgardeo/react'; * * // Basic usage - uses default API and contexts * console.log('Created:', org)} * onCancel={() => navigate('/organizations')} * /> * * // With custom organization creation handler * { * const result = await myCustomAPI.createOrganization(payload); * return result; * }} * onSuccess={(org) => { * console.log('Organization created:', org.name); * // Custom success logic here * }} * /> * * // With fallback for unauthenticated users * Please sign in to create an organization} * /> * ``` */ export declare const CreateOrganization: FC; export default CreateOrganization; //# sourceMappingURL=CreateOrganization.d.ts.map