// import { Inject, Injectable, PLATFORM_ID } from '@angular/core'
// import { isPlatformBrowser } from '@angular/common'

// global define window 

// @Injectable()
// export class StorageService {

//     constructor(
//         @Inject(PLATFORM_ID) protected _platformId
//     ) {}


//     /**
//      * getItem function for Local Storage
//      * 
//      * @param key 
//      * @returns string
//      */
//     getItem(key: string): string | undefined {

//         if(isPlatformBrowser(this._platformId)) {
//             return this.api.getItem(key)
//         } else {
//             return undefined
//         }
//     }


//     /**
//      * setItem function for Local Storage
//      * 
//      * @param key 
//      * @param value 
//      */
//     setItem(key: string, value: string): void {

//         if(isPlatformBrowser(this._platformId)) {
//             this.api.setItem(key, value)
//         }
//     }


//     /**
//      * Remove Item function for Local Storage
//      * 
//      * @param key 
//      */
//     removeItem(key: string): void {

//         if(isPlatformBrowser(this._platformId)) {
//             this.api.removeItem(key)
//         }
//     }


//     /**
//      * clear Local Storage
//      */
//     clear(): void {

//         if(isPlatformBrowser(this._platformId)) {
//             this.api.clear()
//         }
//     }
// }