unit Navbar;

interface

uses
  System.SysUtils, System.Classes, WEBLib.Graphics, WEBLib.Forms, Vcl.StdCtrls,
  WEBLib.StdCtrls, Vcl.Controls, WEBLib.Dialogs, Vcl.Imaging.pngimage,
  WEBLib.ExtCtrls, WEBLib.Controls, Web, JS, WEBLib.Menus;

type
  TFNavbar = class(TWebForm)
      btnContactUs: TWebButton;
      btnCompliance: TWebButton;
      btnHome: TWebButton;
    [async]
    procedure btnHomeClick(Sender: TObject);
    procedure btnComplianceClick(Sender: TObject);
    procedure WebFormClose(Sender: TObject; var Action: TCloseAction);
    procedure btnContactUsClick(Sender: TObject);
  public
  end;

var
  FNavbar: TFNavbar;

implementation

{$R *.dfm}

uses
  View.Home, View.Compliance, View.ContactUs;

procedure TFNavbar.btnHomeClick(Sender: TObject);
begin
  Close;
  Application.CreateForm(TFHome, FHome);
end;

procedure TFNavbar.btnComplianceClick(Sender: TObject);
begin
  Close;
  Application.CreateForm(TFCompliance, FCompliance);
end;

procedure TFNavbar.btnContactUsClick(Sender: TObject);
begin
  Close;
  Application.CreateForm(TFContactUs, FContactUs);
end;

procedure TFNavbar.WebFormClose(Sender: TObject; var Action: TCloseAction);
begin
  Action := caFree;
end;

initialization
  RegisterClass(TFNavbar);

end.
