import{a8 as p,ay as g,m as f,A as d}from"./DGtjvSSZ.js";const l="$s";function y(...t){const s=typeof t[t.length-1]=="string"?t.pop():void 0;typeof t[0]!="string"&&t.unshift(s);const[o,e]=t;if(!o||typeof o!="string")throw new TypeError("[nuxt] [useState] key must be a string: "+o);if(e!==void 0&&typeof e!="function")throw new Error("[nuxt] [useState] init must be a function: "+e);const i=l+o,u=p(),n=g(u.payload.state,i);if(n.value===void 0&&e){const a=e();if(f(a))return u.payload.state[i]=a,a;n.value=a}return n}const T=()=>{const t=y("targetType",()=>""),s=y("targetCategory",()=>""),o=y("targetPostId",()=>""),e=y("targetKeywords",()=>[""]),i=r=>{t.value=r},u=r=>{s.value=r},n=r=>{o.value=r},a=r=>{e.value=r},c=d(()=>t.value==="article"?{tipo:t,"category-primary":s,"post-id":o,keywords:e}:{tipo:t,"category-primary":s});return{setTargetType:i,setTargetCategory:u,setTargetPostId:n,setTargetKeywords:a,targeting:c}};export{T as u};