import { DeployedWhenMethod } from "../deploy" ; import { GenericInstanceMethods } from "../jsx" ; import { useImperativeMethods } from "./imperative" ; /**
 * Options for the  useDeployedWhen hook.
 *  public export interface UseDeployedWhenOptions { defaultValue example example trivial ? : boolean ; } remarks Adding a custom `deployedWhen` method to a component allows the component to
 * directly control when the component can be considered deployed.
 *
 * For more information on using `deployedWhen` methods, see
 *  Adapt . DeployedWhenMethod .
 *
 * For components that do not add a custom `deployedWhen` method, the
 * default behavior is that a component becomes deployed when all of it's
 * successors and children have been deployed. See  defaultDeployedWhen * for more information.
 *  public export function useDeployedWhen ( deployedWhen , options = { } ) { const methods = { deployedWhen } ; if ( options . trivial === true ) methods . deployedWhenIsTrivial = true ; useImperativeMethods ( ( ) => methods ) ; }