import * as cdk from 'aws-cdk-lib';
import { Construct } from 'constructs';
{{#if has_frontend}}
import { FrontendConstruct } from './constructs/frontend-construct';
{{/if}}
{{#if has_backend}}
import { BackendConstruct } from './constructs/backend-construct';
{{/if}}
{{#if auth}}
import { AuthConstruct } from './constructs/auth-construct';
{{/if}}
{{#if billing}}
import { BillingConstruct } from './constructs/billing-construct';
{{/if}}
export class AppStack extends cdk.Stack {
constructor(scope: Construct, id: string, props?: cdk.StackProps) {
super(scope, id, props);
{{#if auth}}
const auth = new AuthConstruct(this, 'Auth');
{{/if}}
{{#if has_frontend}}
new FrontendConstruct(this, 'Frontend');
{{/if}}
{{#if has_backend}}
new BackendConstruct(this, 'Backend'{{#if auth}}, { userPool: auth.userPool }{{/if}});
{{/if}}
{{#if billing}}
new BillingConstruct(this, 'Billing');
{{/if}}
}
}