import { ResourceComponent } from "../component/ResourceComponent" ; import ResourceUtils from "../ResourceUtils" ; export interface SlingResourceOptions { depth ? : number ; } export interface EditDialogData { element : string ; html ? : string ; attributes ? : { [ name ] : any ; } ; child ? : EditDialogData ; } /**
 * interface that provides standard aem featres for the resource components.
 */ export interface Sling { param listener param path param options subscribe ( listener , path , options ? ) : void ; param path param resourceType renderDialogScript ( path , resourceType ) : EditDialogData ; param path param resourceType includeResource ( path , resourceType ) : string ; getRequestPath ( ) : string ; getContainingPagePath ( ) : string ; } export abstract class AbstractSling implements Sling { public abstract subscribe ( listener , path , options ? ) ; public abstract renderDialogScript ( path , resourceType ) ; public abstract includeResource ( path , resourceType ) ; public abstract getRequestPath ( ) ; public getContainingPagePath ( ) { return ResourceUtils . getContainingPagePath ( this . getRequestPath ( ) ) ; } }