"use strict";const i=require("react"),n=require("zod"),a=e=>typeof e=="function",h=(e,t)=>a(e)?e(t):e,S=e=>t=>t==null?void 0:e(t),g=e=>t=>t==null?null:e(t),c=e=>m(e)?e():e,m=e=>typeof e=="function",E=({initial:e,value:t,onChange:s})=>{const[l,r]=i.useState(t??e);return t!=null&&s!=null?[t,s]:[l,r]},d=({initial:e,value:t,onChange:s})=>{const[l,r]=i.useState(c(t??e));return t!=null&&s!=null?[t,s]:[l,r]},f=(e,t)=>{const[s,l]=i.useState(()=>{const u=localStorage.getItem(t);return u==null?c(e):JSON.parse(u)}),r=i.useCallback(u=>{l(u),localStorage.setItem(t,JSON.stringify(u))},[l,t]);return[s,r]},p=Object.freeze(Object.defineProperty({__proto__:null,executeInitialSetter:c,executeSetter:h,isInitialSetter:m,isSetter:a,skipNull:g,skipUndefined:S,usePassthrough:E,usePersisted:f,usePurePassthrough:d},Symbol.toStringTag,{value:"Module"})),o=["h1","h2","h3","h4","h5","p","small"],L=n.z.enum(o),z=e=>{const t=o.indexOf(e);return t===-1||t===o.length-1?e:o[t+1]},O=n.z.union([n.z.number(),n.z.enum(["normal","bold","bolder","lighter"])]),b=n.z.object({size:n.z.number(),weight:n.z.union([n.z.number(),n.z.string()]),lineHeight:n.z.number(),textTransform:n.z.string().optional()}),I={tiny:"small",small:"small",medium:"p",large:"h5",huge:"h2"},N={h1:"huge",h2:"huge",h3:"huge",h4:"large",h5:"small",p:"medium",small:"small"};exports.COMPONENT_SIZE_LEVELS=I;exports.LEVELS=o;exports.LEVEL_COMPONENT_SIZES=N;exports.downLevel=z;exports.executeInitialSetter=c;exports.executeSetter=h;exports.levelZ=L;exports.skipNull=g;exports.skipUndefined=S;exports.specZ=b;exports.state=p;exports.usePassthrough=E;exports.usePurePassthrough=d;exports.weightZ=O;
