Warning: session_start(): Session cannot be started after headers have already been sent in /home/tvrreohg/public_html/manga.php on line 13
"use strict";(self.webpackChunkwcf_addons=self.webpackChunkwcf_addons||[]).push([[789],{6789:function(e,t,a){a.r(t),a.d(t,{default:function(){return T}});var l=a(1609),n=a(1632),i=a(2704),r=a(5467),s=a(9916),c=a(9978),o=a(2735),p=a(1886),u=a(9306);const d=[{id:"wcf-title",label:"Title",value:"title"},{id:"wcf-author",label:"Author",value:"author"},{id:"wcf-comments",label:"Comments",value:"comments"},{id:"wcf-trackbacks",label:"Trackbacks",value:"trackbacks"},{id:"wcf-editor",label:"Editor",value:"editor"},{id:"wcf-excerpt",label:"Excerpt",value:"excerpt"},{id:"wcf-revisions",label:"Revisions",value:"revisions"},{id:"wcf-page-attributes",label:"Page Attributes",value:"page-attributes"},{id:"wcf-featured-image",label:"Featured Image",value:"thumbnail"},{id:"wcf-custom-fields",label:"Custom Fields",value:"custom-fields"},{id:"wcf-post-formats",label:"Post Formats",value:"post-formats"}];var m=({postTypeData:e,setPostTypeData:t})=>{var a;const[n,i]=(0,l.useState)(null!==(a=e.supports)&&void 0!==a?a:["title","editor","excerpt","thumbnail"]);return(0,l.useEffect)(()=>{t(e=>({...e,supports:n}))},[n]),(0,l.createElement)("div",null,(0,l.createElement)("div",{className:"py-8"},(0,l.createElement)("div",{className:"mb-4"},(0,l.createElement)("h3",{className:"text-base"},"Supports"),(0,l.createElement)("p",{className:"text-xs mt-1"},"Enable various features in the content editor.")),(0,l.createElement)("div",{className:"grid grid-cols-5 gap-y-2 gap-x-6"},d.map(e=>(0,l.createElement)("div",{key:e.id,className:"group flex flex-row items-center space-x-2"},(0,l.createElement)(o.S,{id:e.id,checked:n.includes(e.value),onCheckedChange:()=>{return t=e.value,void i(e=>e.includes(t)?e.filter(e=>e!==t):[...e,t]);var t}}),(0,l.createElement)(p.J,{htmlFor:e.id,className:"text-sm font-normal flex-1"},e.label))))),(0,l.createElement)("div",{className:"py-8 border-t"},(0,l.createElement)(u.A,{uniqId:"wcf-cpt-advanceConfig-description",label:"Description",placeholder:"Enter Description",value:e.description,valueChange:(e,a)=>{t(t=>({...t,[a]:e}))},changeableValueName:"description"})))};const h=[{uniqId:"wcf-cpt-label-menu-name",label:"Menu Name",key:"menu_name",placeholder:"Enter Text",description:"Admin menu name for the post type.",value:""},{uniqId:"wcf-cpt-label-all-items",label:"All Items",key:"all_items",placeholder:"Enter Text",description:"In the post type submenu in the admin dashboard.",value:""},{uniqId:"wcf-cpt-label-edit-item",label:"Edit Item",key:"edit_item",placeholder:"Enter Text",description:"At the top of the editor screen when editing an item.",value:""},{uniqId:"wcf-cpt-label-view-item",label:"View Item",key:"view_item",placeholder:"Enter Text",description:"In the admin bar to view item when editing it.",value:""},{uniqId:"wcf-cpt-label-view-items",label:"View Items",key:"view_items",placeholder:"Enter Text",description:"Appears in the admin bar in the 'All Posts' view, provided the post type supports archives and the home page is not an archive of that post type.",value:""},{uniqId:"wcf-cpt-label-add-new-items",label:"Add New Item",key:"add_new_item",placeholder:"Enter Text",description:"At the top of the editor screen when adding a new item.",value:""},{uniqId:"wcf-cpt-label-add-new",label:"Add New",key:"add_new",placeholder:"Enter Text",description:"In the post type submenu in the admin dashboard.",value:""},{uniqId:"wcf-cpt-label-new-item",label:"New Item",key:"new_item",placeholder:"Enter Text",description:"In the post type submenu in the admin dashboard.",value:""},{uniqId:"wcf-cpt-label-parent-item-prefix",label:"Parent Item Prefix",key:"parent_item_colon",placeholder:"Enter Text",description:"For hierarchical types in the post type list screen.",value:""},{uniqId:"wcf-cpt-label-search-items",label:"Search Items",key:"search_items",placeholder:"Enter Text",description:"At the top of the items screen when searching for an item.",value:""},{uniqId:"wcf-cpt-label-no-items-found",label:"No Items Found",key:"not_found",placeholder:"Enter Text",description:"At the top of the post type list screen when there are no posts to display.",value:""},{uniqId:"wcf-cpt-label-no-items-found-trash",label:"No Items Found in Trash",key:"not_found_in_trash",placeholder:"Enter Text",description:"At the top of the post type list screen when there are no posts in the trash.",value:""},{uniqId:"wcf-cpt-label-archives-nav-menu",label:"Archives Nav Menu",key:"archives",placeholder:"Enter Text",description:"At the top of the post type list screen when there are no posts in the trash.",value:""},{uniqId:"wcf-cpt-label-attributes-meta-box",label:"Attributes Meta Box",key:"attributes",placeholder:"Enter Text",description:"In the editor used for the title of the post attributes meta box.",value:""},{uniqId:"wcf-cpt-label-featured-image-meta-box",label:"Featured Image Meta Box",key:"featured_image",placeholder:"Enter Text",description:"In the editor used for the title of the featured image meta box.",value:""},{uniqId:"wcf-cpt-label-set-featured-image",label:"Set Featured Image",key:"set_featured_image",placeholder:"Enter Text",description:"As the button label when setting the featured image.",value:""},{uniqId:"wcf-cpt-label-remove-featured-image",label:"Remove Featured Image",key:"remove_featured_image",placeholder:"Enter Text",description:"As the button label when removing the featured image.",value:""},{uniqId:"wcf-cpt-label-use-featured-image",label:"Use Featured Image",key:"use_featured_image",placeholder:"Enter Text",description:"As the button label when removing the featured image.",value:""},{uniqId:"wcf-cpt-label-insert-into-media-button",label:"Insert Into Media Button",key:"insert_into_item",placeholder:"Enter Text",description:"As the button label when adding media to content.",value:""},{uniqId:"wcf-cpt-label-uploaded-to-this-item",label:"Uploaded To This Item",key:"uploaded_to_this_item",placeholder:"Enter Text",description:"In the media modal showing all media uploaded to this item.",value:""},{uniqId:"wcf-cpt-label-filter-items-list",label:"Filter Items List",key:"filter_items_list",placeholder:"Enter Text",description:"Used by screen readers for the filter links heading on the post type list screen.",value:""},{uniqId:"wcf-cpt-label-filter-items-by-date",label:"Filter Items By Date",key:"filter_by_date",placeholder:"Enter Text",description:"Used by screen readers for the filter by date heading on the post type list screen.",value:""},{uniqId:"wcf-cpt-label-items-list-navigation",label:"Items List Navigation",key:"items_list_navigation",placeholder:"Enter Text",description:"Used by screen readers for the filter by date heading on the post type list screen.",value:""},{uniqId:"wcf-cpt-label-items-list",label:"Items List",key:"items_list",placeholder:"Enter Text",description:"Used by screen readers for the items list on the post type list screen.",value:""},{uniqId:"wcf-cpt-label-item-published",label:"Item Published",key:"item_published",placeholder:"Enter Text",description:"In the editor notice after publishing an item.",value:""},{uniqId:"wcf-cpt-label-item-published-privately",label:"Item Published Privately",key:"item_published_privately",placeholder:"Enter Text",description:"In the editor notice after publishing a private item.",value:""},{uniqId:"wcf-cpt-label-item-reverted-to-draft",label:"Item Reverted To Draft",key:"item_reverted_to_draft",placeholder:"Enter Text",description:"In the editor notice after reverting an item to draft.",value:""},{uniqId:"wcf-cpt-label-item-scheduled",label:"Item Scheduled",key:"item_scheduled",placeholder:"Enter Text",description:"In the editor notice after scheduling an item.",value:""},{uniqId:"wcf-cpt-label-item-updated",label:"Item Updated",key:"item_updated",placeholder:"Enter Text",description:"In the editor notice after an item is updated.",value:""},{uniqId:"wcf-cpt-label-item-link",label:"Item Link",key:"item_link",placeholder:"Enter Text",description:"Title for a navigation link block variation.",value:""},{uniqId:"wcf-cpt-label-item-link-description",label:"Item Link Description",key:"item_link_description",placeholder:"Enter Text",description:"Description for a navigation link block variation.",value:""}];var b=a(8046),v=({postTypeData:e,setPostTypeData:t})=>{const[a,i]=(0,l.useState)(e.label||{}),r=(e,l)=>{const n={...a,[l]:e};i(n),t(e=>({...e,label:n}))};return(0,l.createElement)("div",null,(0,l.createElement)("div",{className:"flex justify-end items-center"},(0,l.createElement)(n.$,{className:"h-6 rounded-md",onClick:()=>{i({}),t(e=>({...e,label:{}}))}},"Clear")),(0,l.createElement)("div",{className:"flex flex-col gap-5 py-8"},h?.map((e,t)=>{var n;return(0,l.createElement)(b.A,{key:`wcf-cpt-adv-label-${t}`,uniqId:e.uniqId,label:e.label,placeholder:e.placeholder,description:e.description,value:null!==(n=a[e.key])&&void 0!==n?n:"",valueChange:r,changeableValueName:e.key})})))},f=a(3256),y=({postTypeData:e,setPostTypeData:t})=>{const a=(e,a)=>{t(t=>({...t,[a]:e}))};return(0,l.createElement)("div",null,(0,l.createElement)("div",{className:"flex flex-col gap-7 py-8"},(0,l.createElement)(f.A,{uniqId:"wcf-cpt-show-in-ui-switch",label:"Show In UI",description:"Items can be edited and managed in the admin dashboard.",value:e.show_ui,valueChange:a,changeableValueName:"show_ui"}),e.show_ui&&(0,l.createElement)(f.A,{uniqId:"wcf-cpt-show-in-admin-menu",label:"Show In Admin Menu",description:"Admin editor navigation in the sidebar menu.",value:e.show_in_menu,valueChange:a,changeableValueName:"show_in_menu"}),e.show_ui&&e.show_in_menu&&(0,l.createElement)(b.A,{uniqId:"wcf-cpt-admin-menu-parent",label:"Admin Menu Parent",placeholder:"edit.php?post_type={parent_page}",description:"By default the post type will get a new top level item in the admin menu. If an existing top level item is supplied here, the post type will be added as a submenu item under it.",value:e.admin_menu_parent,valueChange:a,changeableValueName:"admin_menu_parent"}),e.show_ui&&e.show_in_menu&&(0,l.createElement)(b.A,{uniqId:"wcf-cpt-menu-position",label:"Menu Position",placeholder:"Enter Menu Position",description:"The position in the sidebar menu in the admin dashboard.",value:e.menu_position,valueChange:a,changeableValueName:"menu_position"}),e.show_ui&&e.show_in_menu&&(0,l.createElement)(b.A,{uniqId:"wcf-cpt-menu-icon",label:"Menu Icon",placeholder:"Enter Menu Icon Class Name",value:e.menu_icon,valueChange:a,changeableValueName:"menu_icon"}),e.show_ui&&(0,l.createElement)(b.A,{uniqId:"wcf-cpt-custom-meta-box-callback",label:"Custom Meta Box Callback",placeholder:"Enter Custom Meta Box Callback",description:"A PHP function name to be called when setting up the meta boxes for the edit screen. For security, this callback will be executed in a special context without access to any superglobals like $_POST or $_GET.",value:e.register_meta_box_cb,valueChange:a,changeableValueName:"register_meta_box_cb"})),(0,l.createElement)("div",{className:"flex flex-col gap-7 py-8 border-t"},e.show_ui&&(0,l.createElement)(f.A,{uniqId:"wcf-cpt-show-in-admin-bar-switch",label:"Show In Admin Bar",description:"Appears as an item in the 'New' menu in the admin bar.",value:e.show_in_admin_bar,valueChange:a,changeableValueName:"show_in_admin_bar"}),(0,l.createElement)(f.A,{uniqId:"wcf-cpt-appearance-menus-support",label:"Appearance Menus Support",description:"Allow items to be added to menus in the 'Appearance' > 'Menus' screen. Must be turned on in 'Screen options'.",value:e.show_in_nav_menus,valueChange:a,changeableValueName:"show_in_nav_menus"}),(0,l.createElement)(f.A,{uniqId:"wcf-cpt-exclude-from-search",label:"Exclude From Search",description:"Sets whether posts should be excluded from search results and taxonomy archive pages.",value:e.exclude_from_search,valueChange:a,changeableValueName:"exclude_from_search"})))},_=a(3483);const w=[{key:"post_type_key",name:"Post Type Key (default)"},{key:"custom_permalink",name:"Custom Permalink"},{key:"no_permalink",name:"No Permalink (prevent URL rewriting)"}],g=[{key:"post_type_key",name:"Post Type Key (default)"},{key:"custom_query_variable",name:"Custom Query Variable"},{key:"no_query_variable_support",name:"No Query Variable Support"}];var E=({postTypeData:e,setPostTypeData:t})=>{var a,n,i,r,s,c,o,p;const[u,d]=(0,l.useState)(e.rewrite||{}),m=(e,a)=>{const l={...u,[a]:e};d(l),t(e=>({...e,rewrite:l}))},h=(e,a)=>{t(t=>({...t,[a]:e}))};return(0,l.createElement)("div",null,(0,l.createElement)("div",{className:"flex flex-col gap-7 py-8"},(0,l.createElement)(_.A,{uniqId:"wcf-cpt-permalink-rewrite-select",label:"Permalink Rewrite",placeholder:"Select",selectItems:w,value:null!==(a=u.permalink_type)&&void 0!==a?a:w[0].key,valueChange:m,changeableValueName:"permalink_type"}),"custom_permalink"===u.permalink_type&&(0,l.createElement)(b.A,{uniqId:"wcf-cpt-url-slug",label:"URL Slug",placeholder:"",description:"Customize the slug used in the URL.",value:null!==(n=u.slug)&&void 0!==n?n:"",valueChange:m,changeableValueName:"slug"}),"no_permalink"!==u.permalink_type&&(0,l.createElement)(f.A,{uniqId:"wcf-cpt-front-url-prefix-switch",label:"Front URL Prefix",description:"Alters the permalink structure to add the `WP_Rewrite::$front` prefix to URLs.",value:null!==(i=u.with_front)&&void 0!==i?i:"",valueChange:m,changeableValueName:"with_front"}),"no_permalink"!==u.permalink_type&&(0,l.createElement)(f.A,{uniqId:"wcf-cpt-feed-url-switch",label:"Feed URL",description:"RSS feed URL for the post type items.",value:null!==(r=u.feeds)&&void 0!==r?r:"",valueChange:m,changeableValueName:"feeds"}),"no_permalink"!==u.permalink_type&&(0,l.createElement)(f.A,{uniqId:"wcf-cpt-pagination-switch",label:"Pagination",description:"Pagination support for the items URLs such as the archives.",value:null!==(s=u.pages)&&void 0!==s?s:"",valueChange:m,changeableValueName:"pages"})),(0,l.createElement)("div",{className:"flex flex-col gap-7 py-8 border-t border-border"},(0,l.createElement)(f.A,{uniqId:"wcf-cpt-archive-switch",label:"Archive",description:"Has an item archive that can be customized with an archive template file in your theme.",value:e.has_archive,valueChange:h,changeableValueName:"has_archive"}),e.has_archive&&(0,l.createElement)(b.A,{uniqId:"wcf-cpt-archive-slug",label:"Archive Slug",placeholder:"",description:"Custom slug for the Archive URL.",value:null!==(c=e.has_archive_slug)&&void 0!==c?c:"",valueChange:h,changeableValueName:"has_archive_slug"})),(0,l.createElement)("div",{className:"flex flex-col gap-7 py-8 border-t border-border"},(0,l.createElement)(f.A,{uniqId:"wcf-cpt-publicly-queryable-switch",label:"Publicly Queryable",description:"URLs for an item and items can be accessed with a query string.",value:e.publicly_queryable,valueChange:h,changeableValueName:"publicly_queryable"})),e.publicly_queryable&&(0,l.createElement)("div",{className:"flex flex-col gap-7 py-8 border-t border-border"},(0,l.createElement)(_.A,{uniqId:"wcf-cpt-query-variable-support-select",label:"Query Variable Support",placeholder:"Select",selectItems:g,description:"Items can be accessed using the non-pretty permalink, eg. {post_type}={post_slug}.",value:null!==(o=e.query_var)&&void 0!==o?o:g[0].key,valueChange:h,changeableValueName:"query_var"}),"custom_query_variable"===e.query_var&&(0,l.createElement)(b.A,{uniqId:"wcf-cpt-query-variable-support-variable",label:"Query Variable",placeholder:"",description:"Customize the query variable name.",value:null!==(p=e.query_var_data)&&void 0!==p?p:"",valueChange:h,changeableValueName:"query_var_data"})))},x=({postTypeData:e,setPostTypeData:t})=>{var a,n;const i=(e,a)=>{t(t=>({...t,[a]:e}))};return(0,l.createElement)("div",{className:"flex flex-col gap-7 py-8 max-w-[600px]"},(0,l.createElement)(f.A,{uniqId:"wcf-cpt-rename-capabilities-switch",label:"Rename Capabilities",description:"By default the capabilities of the post type will inherit the 'Post' capability names, eg. edit_post, delete_posts. Enable to use post type specific capabilities, eg. edit_{singular}, delete_{plural}.",value:e.capability,valueChange:i,changeableValueName:"capability"}),e.capability&&(0,l.createElement)(l.Fragment,null,(0,l.createElement)(b.A,{uniqId:"wcf-cpt-singular-capability-name",label:"Singular Capability Name",placeholder:"",description:"Choose another post type to base the capabilities for this post type.",value:null!==(a=e.capability_singular)&&void 0!==a?a:"",valueChange:i,changeableValueName:"capability_singular"}),(0,l.createElement)(b.A,{uniqId:"wcf-cpt-plural-capability-name",label:"Plural Capability Name",placeholder:"",description:"Optionally provide a plural to be used in capabilities.",value:null!==(n=e.capability_plural)&&void 0!==n?n:"",valueChange:i,changeableValueName:"capability_plural"})),(0,l.createElement)(f.A,{uniqId:"wcf-cpt-can-export-switch",label:"Can Export",description:"Allow the post type to be exported from 'Tools' > 'Export'.",value:e.can_export,valueChange:i,changeableValueName:"can_export"}),(0,l.createElement)(f.A,{uniqId:"wcf-cpt-delete-with-user-switch",label:"Delete With User",description:"Delete items by a user when that user is deleted.",value:e.delete_with_user,valueChange:i,changeableValueName:"delete_with_user"}))},I=a(2139),N=a(6611),k=a(9526),A=({postTypeData:e,setPostTypeData:t})=>{var a,n,i,r;const s=(e,a)=>{t(t=>({...t,[a]:e}))};return(0,l.createElement)("div",{className:"flex flex-col gap-7 py-8 max-w-[600px]"},(0,l.createElement)(f.A,{uniqId:"wcf-cpt-show-in-REST-API-switch",label:"Show In REST API",description:"Exposes this post type in the REST API. Required to use the block editor.",value:e.show_in_rest,valueChange:s,changeableValueName:"show_in_rest"}),e.show_in_rest&&(0,l.createElement)(l.Fragment,null,(0,l.createElement)(b.A,{uniqId:"wcf-cpt-base-URL",label:"Base URL",placeholder:"",description:"The base URL for the post type REST API URLs.",value:null!==(a=e.rest_base)&&void 0!==a?a:"",valueChange:s,changeableValueName:"rest_base"}),(0,l.createElement)(b.A,{uniqId:"wcf-cpt-namespace-route",label:"Namespace Route",placeholder:"wp/v2",description:"The namespace part of the REST API URL.",value:null!==(n=e.rest_namespace)&&void 0!==n?n:"",valueChange:s,changeableValueName:"rest_namespace"}),(0,l.createElement)(b.A,{uniqId:"wcf-cpt-controller-class",label:"Controller Class",placeholder:"WP_REST_Posts_Controller",description:"Optional custom controller to use instead of `WP_REST_Posts_Controller`.",value:null!==(i=e.rest_controller_class)&&void 0!==i?i:"",valueChange:s,changeableValueName:"rest_controller_class"}),(0,l.createElement)(u.A,{uniqId:"wcf-cpt-template",label:"Template",placeholder:"",value:null!==(r=e.template)&&void 0!==r?r:"",valueChange:s,changeableValueName:"template",description:"JSON String of blocks to use as the default initial state for an editor session. Each item should be an JSON containing block name and optional attributes."})))},T=()=>{const{updateTabKey:e}=(0,i.Vh)(),{setAllPostTypes:t}=(0,i.yl)(),a=new URL(window.location.href),o=a.searchParams.get("postId"),[u,d]=(0,l.useState)({}),[h,_]=(0,l.useState)(""),[w,g]=(0,l.useState)([]),[T,q]=(0,l.useState)(""),[C,P]=(0,l.useState)(""),[S,D]=(0,l.useState)(!1),V=t=>{const l=a.searchParams.get("page");a.search="",a.hash="",a.search=`page=${l}`,a.searchParams.set("tab",t),window.history.replaceState({},"",a),e(t)};(0,l.useEffect)(()=>{(async e=>{try{await fetch(WCF_ADDONS_ADMIN.ajaxurl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams({action:"aae_post_type_builder_single_item",post_type_id:e,nonce:WCF_ADDONS_ADMIN.nonce})}).then(e=>e.json()).then(e=>{d(e?.data?.meta),D(e?.data?.meta?.post_type_key);const t=(0,N.Z)(e?.data?.taxonomies);g(t),_(e?.data?.title)})}catch(e){console.log(e)}})(o)},[]);const R=(e,t)=>{"post_type_key"===t&&L(e),d(a=>({...a,[t]:e}))},L=(0,l.useCallback)((0,N.e)(async e=>{try{await fetch(WCF_ADDONS_ADMIN.ajaxurl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams({action:"aae_post_type_exist",post_type:e,nonce:WCF_ADDONS_ADMIN.nonce})}).then(e=>e.json()).then(e=>{P(e?.hasExist?"Post Type Key Already Exist":"")})}catch(e){console.log(e)}}),[]);return(0,l.createElement)("div",{className:"min-h-[70vh] px-8 py-6 border rounded-2xl"},(0,l.createElement)("div",{className:"pb-6 border-b"},(0,l.createElement)("div",{className:"flex gap-11 justify-between items-center"},(0,l.createElement)("div",null,(0,l.createElement)("h2",{className:"text-[18px] font-medium "},h)),(0,l.createElement)("div",null,(0,l.createElement)(n.$,{onClick:()=>(async()=>{if(!T&&!C)try{await fetch(WCF_ADDONS_ADMIN.ajaxurl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams({action:"aae_add_or_update_new_post_type_builder",post_meta:JSON.stringify(u),post_type_id:o,post_type_title:h,nonce:WCF_ADDONS_ADMIN.nonce})}).then(e=>e.json()).then(e=>{t(e?.data),V("post-types")})}catch(e){console.log(e)}})()},"Save Post Type")))),(0,l.createElement)("div",{className:"mt-8"},(0,l.createElement)(r.Qp,null,(0,l.createElement)(r.AB,{className:"text-brand text-xs items-center"},(0,l.createElement)(r.J5,null,(0,l.createElement)(r.w1,{onClick:()=>V("post-types"),className:"text-text-2"},"Post Types")),(0,l.createElement)(r.tH,null),(0,l.createElement)(r.J5,null,(0,l.createElement)(r.tJ,null,"Update Post Type"))))),(0,l.createElement)("div",{className:"mt-11"},(0,l.createElement)("div",null,(0,l.createElement)("div",{className:"flex flex-col gap-5 pb-11"},(0,l.createElement)(b.A,{uniqId:"wcf-cpt-plural-label",label:"Plural Label",placeholder:"Enter Plural Label",value:h,valueChange:(e,t)=>{_(e)},changeableValueName:"post_title"}),(0,l.createElement)(b.A,{uniqId:"wcf-cpt-singular-label",label:"Singular Label",placeholder:"Enter Singular Label",value:u.singular_name,valueChange:R,changeableValueName:"singular_name"}),(0,l.createElement)("div",{className:"grid w-full max-w-lg items-center gap-2"},(0,l.createElement)(p.J,{htmlFor:"wcf-cpt-post-type-key"},"Post Type Key"),(0,l.createElement)(k.p,{id:"wcf-cpt-post-type-key",placeholder:"Enter Post Type Key",value:u.post_type_key,disabled:S,onChange:e=>{const t=e.target.value,a=t.replace(/\s+/g,"");q(t!==a?"Spaces are not allowed.":""),R(a,"post_type_key")}}),(T||C)&&(0,l.createElement)("small",{className:"text-brand"},T||C),(0,l.createElement)("small",null,"Lower case letters, underscores and dashes only, Max 20 characters.")),(0,l.createElement)(I.A,{uniqId:"wcf-cpt-taxonomies-select",label:"Taxonomies",placeholder:"Select",showItems:w,description:"Select existing taxonomies to classify items of the post type.",selected:u.taxonomies,valueChange:d,changeableValueName:"taxonomies"})),(0,l.createElement)("div",{className:"flex flex-col gap-5 pb-11 pt-11 border-t"},(0,l.createElement)(f.A,{uniqId:"wcf-cpt-public-switch",label:"Public",description:"Visible on the frontend and in the admin dashboard.",value:u.public,valueChange:R,changeableValueName:"public"}),(0,l.createElement)(f.A,{uniqId:"wcf-cpt-hierarchical-switch",label:"Hierarchical",description:"Hierarchical post types can have descendants (like pages).",value:u.hierarchical,valueChange:R,changeableValueName:"hierarchical"}),(0,l.createElement)(f.A,{uniqId:"wcf-cpt-advanceConfig-active-switch",label:"Active",description:"Active post types are enabled and registered with WordPress.",value:u.active,valueChange:R,changeableValueName:"active"})),(0,l.createElement)("div",{className:"flex flex-col gap-5 pb-11 pt-11 border-t"},(0,l.createElement)(f.A,{uniqId:"wcf-cpt-advanceConfig-switch",label:"Advance Configuration",description:"I know what I'm doing, show me all the options.",value:u.advance,valueChange:R,changeableValueName:"advance"}))),u.advance&&(0,l.createElement)("div",{className:"border rounded-lg"},(0,l.createElement)(s.nD,{defaultValue:"advance_type",type:"single",collapsible:!0,className:"w-full"},(0,l.createElement)(s.As,{value:"advance_type"},(0,l.createElement)(s.$m,{className:"px-8"},"Advance Settings"),(0,l.createElement)(s.ub,null,(0,l.createElement)(c.tU,{defaultValue:"general"},(0,l.createElement)(c.j7,{className:"w-full justify-start py-4 px-4 border-b bg-transparent rounded-none"},(0,l.createElement)(c.Xi,{value:"general"},"General"),(0,l.createElement)(c.Xi,{value:"labels"},"Labels"),(0,l.createElement)(c.Xi,{value:"visibility"},"Visibility"),(0,l.createElement)(c.Xi,{value:"urls"},"URLs"),(0,l.createElement)(c.Xi,{value:"permissions"},"Permissions"),(0,l.createElement)(c.Xi,{value:"rest_api"},"REST API")),(0,l.createElement)(c.av,{value:"general",className:"px-8"},(0,l.createElement)(m,{postTypeData:u,setPostTypeData:d})),(0,l.createElement)(c.av,{value:"labels",className:"px-8"},(0,l.createElement)(v,{postTypeData:u,setPostTypeData:d})),(0,l.createElement)(c.av,{value:"visibility",className:"px-8"},(0,l.createElement)(y,{postTypeData:u,setPostTypeData:d})),(0,l.createElement)(c.av,{value:"urls",className:"px-8"},(0,l.createElement)(E,{postTypeData:u,setPostTypeData:d})),(0,l.createElement)(c.av,{value:"permissions",className:"px-8"},(0,l.createElement)(x,{postTypeData:u,setPostTypeData:d})),(0,l.createElement)(c.av,{value:"rest_api",className:"px-8"},(0,l.createElement)(A,{postTypeData:u,setPostTypeData:d})))))))))}}}]);