import{r as l,u as s,X as g,a1 as h,a6 as m}from"./entry.fce5ecd9.js";function C(v,u){var i=u||{},f=i.defaultValue,c=i.value,a=c===void 0?l():c,n=typeof v=="function"?v():v;a.value!==void 0&&(n=s(a)),f!==void 0&&(n=typeof f=="function"?f():f);var t=l(n),r=l(n);g(function(){var e=a.value!==void 0?a.value:t.value;u.postState&&(e=u.postState(e)),r.value=e});function d(e){var o=r.value;t.value=e,m(r.value)!==e&&u.onChange&&u.onChange(e,o)}return h(a,function(){t.value=a.value}),[r,d]}export{C as u};
