import{S as STORAGE_KEY_KIMLIK_TOKEN,a as STORAGE_KEY_KIMLIK_USER_ID}from"./kimlik-api-fddeac81.js";import{C as CookieStorage}from"./cookie-5d9f5819.js";function getCookieStorage(){return new CookieStorage}var getSessionData=function(o){if(o===void 0){o=getCookieStorage()}return{token:o.get(STORAGE_KEY_KIMLIK_TOKEN),uid:o.get(STORAGE_KEY_KIMLIK_USER_ID)}};function isUserLoggedIn(o,e){var t=!!getSessionData(o).token;e===null||e===void 0?void 0:e.new("KimlikUtilFunctions").debugGroup("isUserLoggedIn",{result:t,sessionData:getSessionData(o),storage:o.getAll()});return t}function logout(o,e,t,i){if(o===void 0){o="/"}if(t===void 0){t=getCookieStorage()}if(i===void 0){i=function(o){return window.location=o.path}}if(e){e===null||e===void 0?void 0:e.logout().then((function(){t.clear();i({path:o})}))}else{t.clear();i({path:o})}}export{getSessionData as g,isUserLoggedIn as i,logout as l};