/// <reference path="./sigApi.PropertyObject.d.ts" />

declare namespace SigApi {
    interface Route {
        /**
         * Returns the path of the route
         * 
         * @returns {string} The path of the route
         */
        getPath(): string
        /**
         * Returns the parent route
         * 
         * @returns {Route|null} The parent of the Route or null if the route has no parent
         */
        getParent(): Route | null
        /**
         * Returns all children of the route
         * 
         * @returns {Route[]} An array of all child-routes
         */
        getChildren(): Route[]
        /**
         * Checks if this is the default route
         * 
         * @returns {boolean} true if it is the default route and false if not
         */
        isDefault(): boolean
        /**
         * Checks if the route has an icon
         * 
         * @returns {boolean} true if it has an icon and false if not
         */
        hasIcon(): boolean
        /**
         * Gets the path to the icon
         * 
         * @returns {string} the path to the icon or undefined if the is no icon
         */
        getIcon(): string
        /**
         * Checks if the route has a label
         * 
         * @returns {boolean} true if it has an label and false if not
         */
        hasLabel(): boolean
        /**
         * Gets the label of the route
         * 
         * @returns {string} the label of the route in the current language or undefined if no label was set
         */
        getLabel(): string
        /**
         * Checks if a route index was set
         * 
         * @returns {boolean} true if a routeIndex was set and false if not
         */
        hasRouteIndex(): boolean
        /**
         * Returns the routeIndex of the route
         * 
         * @returns {number} The route index of the route or undefined if nothing was set
         */
        getRouteIndex(): number
        /**
         * Checks if the route has a checkbit
         * 
         * @returns {boolean}
         */
        hasCheckbit(): boolean
        /**
         * Returns the checkbit value
         * 
         * @returns {undefined|boolean}
         */
        getCheckbit(): boolean | undefined
        /**
         * Returns the blueprint of a property
         * 
         * @param {string} name The name of the searched child
         * @returns {undefined|PropertyObject} 
         */
        getPropertyObjByName(name: string): PropertyObject | undefined
        /**
         * Returns the InstanceId of the route
         * 
         * @returns {string} The instanceId of the route
         */
        getInstanceId(): string
        /**
         * Checks if this route is a child from another route
         * 
         * @param {Route} route The parent Route
         * 
         * @returns {boolean} true if the given route is the parent from this route, and false if not 
         */
        isChildFrom(route: Route): boolean
        /**
         * Adds an callback to the route, which gets called, if a property values changes (label, routeIndex, icon)
         * 
         * @param {Function} fcn A callback which gets the property name as the first parameter, and the new value as the second
         * 
         * function: (propertyName: `string`, value: `any`)
         */
        addUpdateFcn(fcn: (name: string, value: any) => void): void
        /**
         * Removes a callback function from the route 
         * 
         * @param {Function} fcn The function which was given by "addUpdateFcn"
         */
        removeUpdateFcn(fcn: (name: string, value: any) => void): void
        /**
         * Returns the accessNumber of the route
         * 
         * @returns {number}
         */
        getAccessNumber(): number
    }
}
