# @esqyre/rental-lib

A comprehensive Angular library containing reusable components for Esqyre applications.

## Components

This library provides the following components with unique selectors to avoid conflicts:

### CarCardComponent
- **Selector**: `esqyre-car-card`
- **Purpose**: Displays car information in a card format
- **Inputs**: `car` (Vehicle object)
- **Outputs**: `clicked` (EventEmitter)

### FlightDetailsComponent
- **Selector**: `esqyre-flight-details`
- **Purpose**: Displays flight information and details
- **Inputs**: `flightData` (Flight data object)

### RentalLibComponent
- **Selector**: `esqyre-rental`
- **Purpose**: Main library component

## Installation

```bash
npm install @esqyre/rental-lib
```

## Usage

```typescript
import { CarCardComponent, FlightDetailsComponent, RentalLibComponent } from '@esqyre/rental-lib';

// In your component
@Component({
  template: `
    <esqyre-car-card [car]="carData" (clicked)="onCarClick()"></esqyre-car-card>
    <esqyre-flight-details [flightData]="flightInfo"></esqyre-flight-details>
  `
})
export class YourComponent {
  carData = { /* your car data */ };
  flightInfo = { /* your flight data */ };
  
  onCarClick() {
    // Handle car click
  }
}
```

## Development

### Running the Demo App Locally

To test and design components locally, you can run the included demo app:

```bash
npm run demo
```

This will start a development server (usually at `http://localhost:4200`) where you can:
- See all library components in action
- Test component designs and styles
- Make changes to components and see them update in real-time with hot reload
- Add new component examples to `projects/demo/src/app/app.component.html`

The demo app imports components directly from the library source, so any changes you make to components will be reflected immediately without rebuilding the library.

### Build

Run `ng build rental-lib` to build the project. The build artifacts will be stored in the `dist/` directory.

### Local Build

Run `npm run build:local` to build and create a local tar file for testing.

### Publishing

After building your library with `ng build rental-lib`, go to the dist folder `cd dist/rental-lib` and run `npm publish`.

### Running unit tests

Run `ng test rental-lib` to execute the unit tests via [Karma](https://karma-runner.github.io).

## Further help

To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.
