# Configuration UnionFlow Client
quarkus.application.name=unionflow-client
quarkus.application.version=1.0.0

# Configuration HTTP
quarkus.http.port=8082
quarkus.http.host=0.0.0.0
quarkus.http.root-path=/
quarkus.http.so-reuse-port=true
quarkus.http.tcp-quick-ack=true
quarkus.http.tcp-cork=true

# Configuration Session HTTP
quarkus.http.session-timeout=60m
quarkus.http.session-cookie-same-site=lax
quarkus.http.session-cookie-http-only=true
quarkus.http.session-cookie-secure=false

# Configuration logging
quarkus.log.console.enable=true
quarkus.log.console.level=INFO
quarkus.log.console.format=%d{yyyy-MM-dd HH:mm:ss,SSS} %-5p [%c{2.}] (%t) %s%e%n

# MyFaces Configuration
quarkus.myfaces.project-stage=Development
quarkus.myfaces.state-saving-method=server
quarkus.myfaces.number-of-views-in-session=50
quarkus.myfaces.number-of-sequential-views-in-session=10
quarkus.myfaces.serialize-state-in-session=false
quarkus.myfaces.client-view-state-timeout=3600000
quarkus.myfaces.view-expired-exception-handler-redirect-page=/pages/public/login.xhtml
quarkus.myfaces.check-id-production-mode=false
quarkus.myfaces.strict-xhtml-links=false
quarkus.myfaces.refresh-transient-build-on-pss=true
quarkus.myfaces.resource-max-time-expires=604800000
quarkus.myfaces.resource-buffer-size=2048

# PrimeFaces Configuration  
primefaces.THEME=freya-blue-light
primefaces.FONT_AWESOME=true
primefaces.CLIENT_SIDE_VALIDATION=true
primefaces.MOVE_SCRIPTS_TO_BOTTOM=true
primefaces.CSP=false
primefaces.UPLOADER=commons
primefaces.AUTO_UPDATE=false
primefaces.CACHE_PROVIDER=org.primefaces.cache.DefaultCacheProvider
primefaces.RESOURCE_HANDLER=org.primefaces.application.resource.PrimeResourceHandler

# OmniFaces Configuration
omnifaces.CDN_RESOURCE_HANDLER_DISABLED=true
omnifaces.COMBINED_RESOURCE_HANDLER_DISABLED=false

# Configuration Backend UnionFlow
unionflow.backend.url=${UNIONFLOW_BACKEND_URL:http://localhost:8080}

# Configuration REST Client
quarkus.rest-client."unionflow-api".url=${unionflow.backend.url}
quarkus.rest-client."unionflow-api".scope=jakarta.inject.Singleton
quarkus.rest-client."unionflow-api".connect-timeout=5000
quarkus.rest-client."unionflow-api".read-timeout=30000

# Gestion des erreurs REST
quarkus.rest-client."unionflow-api".providers=dev.lions.unionflow.client.service.RestClientExceptionMapper

# Configuration JWT et Sécurité
unionflow.jwt.secret=${JWT_SECRET:union-flow-secret-key-very-long-and-secure-2024}
unionflow.jwt.issuer=${JWT_ISSUER:unionflow-platform}
unionflow.jwt.expiration-time=${JWT_EXPIRATION:3600}
unionflow.jwt.refresh-expiration-time=${JWT_REFRESH_EXPIRATION:86400}

# Configuration Session
unionflow.session.timeout=${SESSION_TIMEOUT:1800}
unionflow.session.remember-me.duration=${REMEMBER_ME_DURATION:604800}

# Configuration de sécurité
unionflow.security.enable-csrf=${ENABLE_CSRF:true}
unionflow.security.password.min-length=${PASSWORD_MIN_LENGTH:8}
unionflow.security.password.require-special-chars=${PASSWORD_REQUIRE_SPECIAL:true}
unionflow.security.max-login-attempts=${MAX_LOGIN_ATTEMPTS:5}
unionflow.security.lockout-duration=${LOCKOUT_DURATION:300}

# Dev mode configuration
%dev.quarkus.log.category."dev.lions.unionflow".level=DEBUG
%dev.quarkus.log.category."jakarta.faces".level=INFO
%dev.quarkus.log.category."org.apache.myfaces".level=INFO
%dev.quarkus.log.category."org.primefaces".level=INFO
%dev.quarkus.myfaces.project-stage=Development
%dev.quarkus.live-reload.instrumentation=true

# Prod mode configuration
%prod.quarkus.log.console.level=WARN
%prod.quarkus.myfaces.project-stage=Production
%prod.quarkus.myfaces.serialize-state-in-session=true