import{C as l,l as c,P as g,g as d}from"./lib-1.0.63-DJZPtMem.js";const P=(t,e)=>{const s={};return t.map(n=>{const o=d(e,n.columnName);o!==void 0&&(s[n.columnName]=o.data_type)}),s},h=t=>{const e=t==null?void 0:t.toLocaleLowerCase(),s=["httpGet","httpPost","httpRequest"],n=[];return s.map(o=>{let i=0;for(;(i=e.indexOf(o==null?void 0:o.toLocaleLowerCase(),i))!==-1;){const a=e.substring(i);c.debug(a,i);const r=a.indexOf("["),u=a.indexOf("]");if(r!==-1&&u!==-1){const m=a.substring(r+1,u).replaceAll("'","").replaceAll('"',"");c.debug(m),n.filter(p=>p.paramName===m).length===0&&n.push({paramName:m,paramType:o})}i++}}),c.debug(n),n},b=t=>{var s,n;const e=h(t);if(e.length>0){const o=new URLSearchParams(window.location.search),i=((n=(s=l)==null?void 0:s.appSiteInfo)==null?void 0:n.appVars)??{},a={};if(e.map(r=>{if(r.paramType==="httpGet"||r.paramType==="httpRequest"){const u=o.get(r.paramName);u!==null&&(a.get||(a.get={}),a.get[r.paramName]=u)}(r.paramType==="httpPost"||r.paramType==="httpRequest")&&Object.keys(i).map(u=>{a.post||(a.post={}),a.post[u]=i[u]})}),Object.keys(a).length>0)return a}},y=()=>{const t=new URLSearchParams(window.location.search).get("pp-page");return c.debug("customPageIndex",t),t!==null&&!isNaN(t)&&Number(t)>0?(c.debug("customPageIndex",t),Number(t)):0},x=(t,e)=>({...e!==!0&&{"& input":{textAlign:t.alignment}},...e==!0&&{"& textarea":{textAlign:t.alignment}},"& .MuiInputBase-root.Mui-focused .MuiOutlinedInput-notchedOutline":{borderWidth:"1px"},"& .MuiInputBase-root:before":{borderBottomWidth:"1px !important"},"& .MuiInputBase-root.Mui-focused:after":{borderBottomWidth:"1px"}}),C=t=>t.table.searchSettings.searchFormPosition===g.HEADER||t.state.masterDetailConditions!==void 0,w=(t,e,s)=>e===0?{}:{},I=t=>{const e={};return t.columns.map(s=>{e[s.columnName]={enabled:!0,layout:"rendered"}}),e};export{y as a,w as b,C as c,P as d,I as e,x as f,b as g};
