unit Sparkle.Design.Register;

interface

{$IF CompilerVersion >= 27}
  {$DEFINE DELPHIXE6_LVL}
{$IFEND}

procedure Register;

implementation

uses
  Classes, StrEdit, DesignIntf,
  Sparkle.Comp.Server,
  Sparkle.Comp.StaticServer,
  Sparkle.Comp.HttpSysDispatcher,
  Sparkle.Comp.JwtMiddleware,
  Sparkle.Comp.CorsMiddleware,
  Sparkle.Comp.BasicAuthMiddleware,
  Sparkle.Comp.CompressMiddleware,
  Sparkle.Design.Editors;

{$R dclsparkle.dcr}

procedure Register;
begin
  RegisterComponents('TMS Sparkle', [TSparkleHttpSysDispatcher, TSparkleStaticServer, TSparkleGenericServer]);
  RegisterNoIcon([{$IFDEF DELPHIXE6_LVL}TSparkleJwtMiddleware,{$ENDIF}
    TSparkleCompressMiddleware, TSparkleBasicAuthMiddleware, TSparkleCorsMiddleware]);
  RegisterMiddleware([{$IFDEF DELPHIXE6_LVL}TSparkleJwtMiddleware,{$ENDIF}
    TSparkleCompressMiddleware, TSparkleBasicAuthMiddleware, TSparkleCorsMiddleware]);

  RegisterComponentEditor(TSparkleServer, TSparkleServerEditor);
  RegisterPropertyEditor(TypeInfo(string), TSparkleServer, 'BaseUrl', TSparkleBaseUrlProperty);
end;

end.
